|
|
|
|
|
by Markku
5410 days ago
|
|
This is really not a good example as games have (read should have) entity systems. See e.g. these two links for an introduction.
http://t-machine.org/index.php/2007/09/03/entity-systems-are...
http://www.purplepwny.com/blog/?p=215 There should be no Draw() in your game object (read entity) base class. Not every entity is rendered. You should have instead a component Renderable. And if it happens to be so that your special snowflake has a Renderable component then you can render it on screen. E.g. AI pathing nodes would not usually have one unless you are debugging them you can add one. In your example you end up with Movable extending GameObject, Camera extending GameObject and then you have no way of combining these two behaviours. |
|