Timeline for Getting a Specific Component in an Entity Component System
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 18, 2015 at 4:52 | answer | added | Sean Middleditch | timeline score: 1 | |
| Sep 18, 2015 at 4:12 | comment | added | Vaillancourt♦ | I would suggest you add the c++ tag to your question, as c++ is a bit different from c#/java w.r.t. RTTI availability and usage. | |
| Sep 18, 2015 at 4:10 | comment | added | Vaillancourt♦ | If you don't want to cast, you can transfer your objects from being held by the entity to being held by a manager of that type of component. I have only tried a bit this method so I'm not sure how it goes on a 'serious/normal' project. | |
| Sep 18, 2015 at 4:09 | comment | added | Vaillancourt♦ | TBH, if you know that your component is of a certain type, downcast it and get on with it. As long as you do it statically and not dynamically :) The other way around is using stuff like what's in Unity/c#/Java where RTTI is available and well, part of the language. | |
| Sep 18, 2015 at 4:02 | review | First posts | |||
| Sep 18, 2015 at 6:34 | |||||
| Sep 18, 2015 at 4:01 | history | asked | Kyle | CC BY-SA 3.0 |