proton_entity_part2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| proton_entity_part2 [2010/10/27 14:29] – seth | proton_entity_part2 [2012/02/07 09:45] (current) – [What's the Proton way to do it?] aki | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| The answer may surprise you... we'll use an extremely simple example to contrast the "old way" with the "new way". | The answer may surprise you... we'll use an extremely simple example to contrast the "old way" with the "new way". | ||
| - | Traditionally in an entity system, you may have said I want to be able to fade out my entity by doing a simple **Entity:: | + | Traditionally in an entity system, you may have said //"Hey mom, I want to be able to fade out my entity by doing a simple **Entity:: |
| And you'd need to add a timer to keep track of the fade which would manipulate the alpha component when rendering. | And you'd need to add a timer to keep track of the fade which would manipulate the alpha component when rendering. | ||
| Line 10: | Line 10: | ||
| ====What' | ====What' | ||
| - | You may say, "//well, that's ok, I'll write a FadeOutComponent//" | + | You: "// |
| - | First, here is a brute force dumb way it could be done by overusing the message | + | First, here is a brute force dumb way it could be done by overusing the message manager: (but notice it does save us from needing to add any code inside the entity or any component classes, we want to keep them as pure as fresh snow) |
| <code cpp> | <code cpp> | ||
proton_entity_part2.1288189767.txt.gz · Last modified: by seth
