public static void openNextScene(SceneBase scene) { Tools.Log("===> openNextScene!"); if (m_busy) { Tools.Log("next scene is busy now!"); return; } //MgrPanel.disposeAllPanel(); if (m_curScene != null) { MgrResLoader.insertRemoving(m_curScene.getResList()); m_curScene.onLeave(); m_curScene = null; } m_busy = true; PanelLoading.open(); MgrResLoader.insertLoading(scene.getResList()); m_nextScene = scene; MgrPanel.disposeAllPanel(); MgrRes.clearObjectCacheAll(); Util.ClearMemory(); MgrResLoader.start(executeSceneDown); }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { MgrPanel.openDialog("Quit Game?", () => { Application.Quit(); }, () => { // }); } }
public void onClickYes() { string text = m_inputText.text; if (!string.IsNullOrEmpty(text)) { if (m_callback != null) { m_callback.Invoke(text); } close(); } else { MgrPanel.openDialog("please enter a text."); } }
public void close() { MgrPanel.closePanel(this); dispose(); }
public override void onCreate(object arguments) { MgrPanel.addPanel(this); onBuild(arguments); }
void onStartGame(GameEvent e) { Tools.Log("Game Start"); MgrPanel.disposeAllPanel(MgrPanel.LAYER_UI); }