// Update is called once per frame void Update() { if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.Android) { if (Input.GetKeyDown(KeyCode.Escape)) { SoundManager.instance.PlaySFX("Click_1"); switch (quitStatus) { case QuitStatus.Lobby: //종료하시겠습니까 창 출력 num++; if (num == 1) { UIManager.instance.quitUI.go_QuitUI.SetActive(true); num = -1; } else if (num == 0) { UIManager.instance.quitUI.go_QuitUI.SetActive(false); } break; case QuitStatus.ChapterSelect: if (UIManager.instance.chapterSelectUI.coroutineNum == 0) { UIManager.instance.lobbyUI.StopCoroutine(UIManager.instance.chapterSelectUI.coroutine); } else { UIManager.instance.chapterSelectUI.StopCoroutine(UIManager.instance.chapterSelectUI.coroutine); } UIManager.instance.chapterSelectUI.go_ChapterSelectUI.SetActive(false); UIManager.instance.lobbyUI.go_LobbyUI.SetActive(true); UIManager.instance.lobbyUI.coroutine1 = StartCoroutine(UIManager.instance.lobbyUI.TextShake()); UIManager.instance.lobbyUI.coroutine2 = StartCoroutine(UIManager.instance.lobbyUI.SlimeRotation()); quitStatus = QuitStatus.Lobby; break; case QuitStatus.Popup: DeactivePopUP(); break; case QuitStatus.StageSelect: UIManager.instance.chapterSelectUI.BackButton(); break; case QuitStatus.StopGame: UIManager.instance.pauseUI.ContinueButton(); break; case QuitStatus.InGame: UIManager.instance.PauseButton(); break; } } } }
public void ActivePopUp(GameObject _currentPopUp, QuitStatus _beforeQuitStatus) { SoundManager.instance.PlaySFX("Click_1"); currentPopUp = _currentPopUp; currentPopUp.SetActive(true); beforeStatus = _beforeQuitStatus; quitStatus = QuitStatus.Popup; }
public void DeactivePopUP() { if (UIManager.instance.endingSceneUI.isEndingCredit) { UIManager.instance.endingSceneUI.StopCoroutine(UIManager.instance.endingSceneUI.coroutine); UIManager.instance.endingSceneUI.isEndingCredit = false; } SoundManager.instance.PlaySFX("Click_1"); currentPopUp.SetActive(false); quitStatus = beforeStatus; }