private void onGameStateChanged(GameStateHandler.GameState state) { foreach (var e in events) { if (e.targetState == state) { e.callback.Invoke(); } } }
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; } }