I’d like to make blueprints of entities that have some default components loaded in, and I’m not quite sure what the proper way to approach that is. For example, I’d like to have classes that look like this:
struct Transformable : public entityx::Entity
{
typedef entityx::Entity super;
Transformable()
{
super( entityManager.entities.create() );
this->assign<Transform>()
this->assign<...>()
}
~Transformable()
{
super::destroy();
}
}
Any tips or tricks would be helpful. So far it looks like it may be possible, but I want to make sure there’s no catches I should be aware about.