Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 public void OnExit(DoorSwitchMiniGame Name)
 {
     CloseMiniGame(Name);
 }
Esempio n. 3
0
 public void OnWin(DoorSwitchMiniGame Name)
 {
     UnlockDoor();
     CloseMiniGame(Name);
 }