public void SwitchToStateVictory() { switch (_currentState) { case EGameState.Victory: return; } SetCurrentState(EGameState.Victory); // State Victory enter logic _onSwitchToStateVictory.Invoke(); }
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(); }