private void onGameStateChanged(GameStateHandler.GameState state)
 {
     foreach (var e in events)
     {
         if (e.targetState == state)
         {
             e.callback.Invoke();
         }
     }
 }
예제 #2
0
    private void onGameStateChanged(GameStateHandler.GameState gameState)
    {
        switch (gameState)
        {
        case GameStateHandler.GameState.Paused:
        case GameStateHandler.GameState.UnpausableCutscene:
        case GameStateHandler.GameState.InteractingWithComputer:
            DisableInput();
            break;

        default:
            EnableInput();
            break;
        }
    }