Systems
Last updated
Was this helpful?
Last updated
Was this helpful?
Systems are where all game logic should happen. Systems move , react to input, draw text and so on.
The Scar::System
class is, just like Scar::Component
, an abstract class but it declares three overridable methods: init
, update
and render
. init
should contain initialization logic, update
should contain game logic while render
should contain drawing logic. The last two get the current , the current and the delta time as parameters, init
does not get a delta time.
There are many builtin systems available, you can find them in the 'Builtin Systems' chapter of this book.