private void backButtonOnClick() { if (GameStateManager.CurrentState == GameState.Pause) { PopupMes.Show("BACK!?", "Do you really want back to main!?", "No", null, "Ok", () => GameStateManager.Idle(null)); } }
private void LateUpdate() { if (Input.GetKeyDown(KeyCode.Escape)) { if (GameStateManager.CurrentState == GameState. WaitGameOver || GameStateManager.CurrentState == GameState.WaitComplete) { return; } var checkPopup = UIManager.listPopup.FirstOrDefault(x => x.Status == UIAnimStatus.IsShow); if (checkPopup != null) { checkPopup.Hide(); return; } if (UIManager.listScreen.Any(x => x.IsAnimation)) { return; } if (UIManager.listPopup.Any(x => x.IsAnimation)) { return; } if (gameOverScreen.Status == UIAnimStatus.IsShow && (GameStateManager.CurrentState == GameState.Complete || GameStateManager.CurrentState == GameState.GameOver)) { GameStateManager.Idle(null); } else if (inGameScreen.Status == UIAnimStatus.IsShow) { if (GameStateManager.CurrentState == GameState.Play) { GameStateManager.Pause(null); } else if (GameStateManager.CurrentState == GameState.Pause) { GameStateManager.Play(null); } } else if (mainScreen.Status == UIAnimStatus.IsShow && GameStateManager.CurrentState == GameState.Idle) { PopupMes.Show("QUIT!?", "Do you realy want to quit!?", "Cancel", null, "Quit", () => { DataManager.Save(true); Application.Quit(); }); } } }
public void Ins_Popup() { PopupMes.Show("This is Popup", "This is popup description", "OK", () => { Debug.Log("Popup -> OK"); }, "Cancel", () => { Debug.Log("Popup -> Cancel"); }); }
public void ShowError(FileStatus status) { string note = ""; if (status == FileStatus.TimeOut || status == FileStatus.NoInternet) { note = LocalizedManager.Key("base_DownloadFirstTime") + "\n" + "\n"; } if (status == FileStatus.TimeOut) { note += LocalizedManager.Key("base_DownloadTimeOut"); } else if (status == FileStatus.NoInternet) { note += LocalizedManager.Key("base_PleaseCheckYourInternetConnection"); } else { note += LocalizedManager.Key("base_SomethingWrongs") + "\n ERROR #" + status; } PopupMes.Show("Oops...!", note, "Ok"); }
public void ForeUpdate() { string title = "New version avaiable!"; string body = "We are trying to improve the game quality by updating it regularly.\nPlease update new version for the best experience!"; PopupMes.Show(title, body, "Update", () => { if (!string.IsNullOrEmpty(UIManager.shareUrl)) { Application.OpenURL(UIManager.shareUrl); } }, "Later", () => { splashScreen?.Hide(); mainScreen.Show(null, () => { GameStateManager.Idle(null); }); }); }