private void CloseMiniGame(DoorSwitchMiniGame Name) { string SceneName; if (Name == DoorSwitchMiniGame.MINIGAME_15Puzzle) { SceneName = "15PuzzleMiniGameScene"; } else { Debug.Log("Unimplemented Minigame scene close"); return; } SceneManager.UnloadSceneAsync(SceneName); GameHandler.Instance.TogglePause(false); Debug.Log("Setting active :" + SceneManager.GetSceneByBuildIndex(PreviousSceneNumber).name); SceneManager.SetActiveScene(SceneManager.GetSceneByBuildIndex(PreviousSceneNumber)); GameHandler.Instance.InMiniGame = false; }
public void OnExit(DoorSwitchMiniGame Name) { CloseMiniGame(Name); }
public void OnWin(DoorSwitchMiniGame Name) { UnlockDoor(); CloseMiniGame(Name); }