Esempio n. 1
0
        /// <summary>
        /// Use this function to change the game state.
        /// </summary>
        /// <param name="newState">New game state</param>
        public void SetState(GameState newState)
        {
            GameState oldState = State;

            State = newState;
            OnGameStateChange?.Invoke(oldState, State);
        }
Esempio n. 2
0
 public void EnterMenu()
 {
     GameReset();
     this.state = GameState.Menu;
     spawners.ForEach((spwn) => spwn.enabled = false);
     Destroy(instance.timeLimitManager);
     instance.timeLimitManager = null;
     SetPlayerInput(false);
     onGameStateChange.Invoke(state);
 }
Esempio n. 3
0
 public void RaiseEvent(GameStates newGameState)
 {
     response.Invoke(newGameState);
 }
 public void OnGameStateChangeEvent(GameModes mode)
 {
     GameStateChangeEvent?.Invoke(mode);
     enumerator = PlayerList.GetEnumerator();
 }