Exemplo n.º 1
0
 void state_PauseState()
 {
     if (_current == _pauseState)
         _current = _rtState;
     else
         _current = _pauseState;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
        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;
        }