Пример #1
0
    //Call this to change the game state
    public void ChangeGameState(StaticData.AvailableGameStates desiredState)
    {
        gameState = desiredState;
        switch (desiredState)
        {
        case StaticData.AvailableGameStates.Menu:
            MenuGameState.Invoke();
            break;

        case StaticData.AvailableGameStates.Starting:
            StartingGameState.Invoke();
            break;

        case StaticData.AvailableGameStates.Paused:
            PausedGameState.Invoke();
            break;

        case StaticData.AvailableGameStates.Playing:
            PlayingGameState.Invoke();
            break;
        }
    }
Пример #2
0
 public void SetGameState(StaticData.AvailableGameStates state)
 {
     gameState = state;
     UpdateMusic();
 }
Пример #3
0
 private void SetState(StaticData.AvailableGameStates state)
 {
     gameState = state;
 }
Пример #4
0
 //Use this function to request a game state change from the GameStateManager
 private void RequestGameStateChange(StaticData.AvailableGameStates state)
 {
     gameStatesManager.ChangeGameState(state);
 }
Пример #5
0
 public void SetGameState(StaticData.AvailableGameStates state)
 {
     gameState = state;
 }