コード例 #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();
    }