Members - Reputation: 659
Posted 05 February 2013 - 05:48 PM
The sprite is rendered because the sprite component registers it with the graphics subsystem.
Similarly, an event listening component could register to receive events. But what I actually do is push the events out, because I know which entities need input.
Members - Reputation: 3556
Posted 10 February 2013 - 12:38 AM
There is no 100% catch all answers for things like this, because programming allows you to organize your data any way you like.
Figure out how your game is going to work. Then you'll know what data you need to keep track of, and how you'll need to organize and process it.
A GameObject class will then consist of anything you know you'll need. Then an entity will also consist of anything the logic will need to see. It might even be an abstract class with different versions that do different things.