Пример #1
0
 public void SwitchToStateVictory()
 {
     switch (_currentState)
     {
     case EGameState.Victory:
         return;
     }
     SetCurrentState(EGameState.Victory);
     // State Victory enter logic
     _onSwitchToStateVictory.Invoke();
 }
Пример #2
0
    public void SwitchToStateGame()
    {
        switch (_currentState)
        {
        case EGameState.Game:
            return;

        case EGameState.Tutorial:
            _onSwitchFromStateTutorialToGame.Invoke();
            SetCurrentState(EGameState.Game);
            return;
        }
        SetCurrentState(EGameState.Game);
        // State Game enter logic
        _onSwitchToStateGame.Invoke();
    }