void state_PauseState() { if (_current == _pauseState) _current = _rtState; else _current = _pauseState; }
void state_EndState() { if (_current == _initState) _current = _rtState; else if (_current == _pauseState) _current = _rtState; else if (_current == _rtState) _current = _endState; else if (_current == _endState) _current = _initState; }
public StateManager(GameArea gameArea, CameraSystem camera) { BaseState.EndState += new ChangeState(state_EndState); BaseState.PauseState += new ChangeState(state_PauseState); _initState = new InitState(camera, gameArea); _rtState = new RealTimeState(camera, gameArea); _pauseState = new PauseState(camera, gameArea); _endState = new EndState(camera, gameArea); _current = _initState; }