Skip to main content
4 events
when toggle format what by license comment
Dec 15, 2014 at 22:01 comment added mklingen You can use a singleton, but I prefer to pass around systems so I can configure them. Yes, you would want the system to operate on base classes, but as soon as the functionality differs a lot (like you're doing a lot of virtual function calls and checks) you will want to make a new system. Another option is you can have the Sprite class itself have static functions that replicate the sprite rendering system. Like you have "unregister" and "register" and "drawsprites" inside "Sprite" as static functions, which is nice and tidy.
Dec 9, 2014 at 19:26 comment added Alex Thanks for the answer - would a system typically be a singleton class? It would seem strange to me for every type of render-able component to have its own sysytem.. would it not be better to have a render system for a base component such as a SpriteComponent?
Dec 8, 2014 at 16:43 history edited mklingen CC BY-SA 3.0
added 360 characters in body
Dec 8, 2014 at 0:36 history answered mklingen CC BY-SA 3.0