/** * Create a new popup to display end game message */ public static void CreateEndGamePopup(string title, string message) { GameObject go_UI_EndGame_Popup = Instantiate(AssetManager.instance.GetUIEndGamePopup(), Vector3.zero, Quaternion.identity); UIEndGamePopup UI_EndGame_Popup = go_UI_EndGame_Popup.GetComponent <UIEndGamePopup>(); UI_EndGame_Popup.Setup(title, message); }
void LateUpdate() { if (GameManager.me == null || GameManager.me.uiManager.currentUI != UIManager.Status.UI_MENU || GameManager.me.uiManager.uiMenu.currentPanel != UIMenu.LOBBY) { return; } updateCamera(); if (Input.GetKeyUp(KeyCode.Escape)) { if (UICamera.hoveredObject != UICamera.fallThrough) { if (GameManager.me.uiManager.uiMenu.rayCast(GameManager.me.uiManager.uiMenuCamera.camera, btnStart.gameObject) == false) { return; } } if (TutorialManager.instance.isTutorialMode || TutorialManager.instance.isReadyTutorialMode) { return; } if (UILoading.nowLoading) { return; } UIEndGamePopup.showEndPopup(); return; } }