Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         MgrPanel.openDialog("Quit Game?", () =>
         {
             Application.Quit();
         }, () =>
         {
             //
         });
     }
 }
Esempio n. 3
0
    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.");
        }
    }
Esempio n. 4
0
 public void close()
 {
     MgrPanel.closePanel(this);
     dispose();
 }
Esempio n. 5
0
 public override void onCreate(object arguments)
 {
     MgrPanel.addPanel(this);
     onBuild(arguments);
 }
Esempio n. 6
0
 void onStartGame(GameEvent e)
 {
     Tools.Log("Game Start");
     MgrPanel.disposeAllPanel(MgrPanel.LAYER_UI);
 }