private void prepareGameLevelIfNecessary() { if (!_isGameLevelPrepared) { //TODO put this code into a separate implementation of a "Level" interface //with methods such as "OnStartState", "OnGameState(bool isPause)" and so on //so that those modals don't appear on every level //Also: put specific interface elements into level scene and then move them to interface hierarchy mainMenu.setResume(); //TODO remove this temporary hack switch (MemoryManager.get().configuration.getMode()) { case GameConfiguration.GameMode.ADVENTURE: fadeSprite.gameObject.SetActive(true); ModalManager.setModal(intro, true, introContinueButton.gameObject, introContinueButton.GetType().Name); changeState(GameState.Pause); break; case GameConfiguration.GameMode.SANDBOX: break; default: Logger.Log("GameStateController::Update unknown game mode=" + MemoryManager.get().configuration.getMode(), Logger.Level.WARN); break; } _isGameLevelPrepared = true; } }