Today I have added support for game states such as gameState, menuState etc. Actually there are two classes:
- StateManager which is singleton and has such functions as pushState, popState, changeState
- State which is abstract class with abstract functions : onEnter, onExit, onUpdate, onDraw, onInput
StateManager is holding stack of states and is calling states from bottom to top, this way I can have gameState to draw it's state and then pauseState or inGameMenuState to draw its content.
No comments:
Post a Comment