Hey.
I've been looking around these forums, and the net in general, about composition for entities in my game over huge inheritance trees.
However, most of them deal with,imho, a lot larger scale game, with registering each component and managers and the suchlike. Whereas I plan on having just a basic thing:
class Entity
{
BehaviourObj behavObj;
DrawObj drawObj;
etc.
}
I picked this up through numerous articles. However, I'm not sure which one of the following I should go for.
1)
class Player(or Enemy, or Bullet, or whatever): public Entity
{
}
Where each object has a single level of inheritance.
2)
class Player(etc.)
{
Entity * entity;
}
And have each object separately, but containing an Entity object.
I am not overly sure.
-Thanks.