protected override void Execute()
 {
     uiManager.CloseMusic();
 }
Beispiel #2
0
    //右键界面操作 全局函数
    public void RightClick()
    {
        if (panels["Title"].activeSelf)
        {
            //标题画面被打开时
            TitleUIManager tm = panels["Title"].GetComponent <TitleUIManager>();
            switch (tm.status)
            {
            case Constants.TITLE_STATUS.EXTRA:
                tm.RightClickReturn();
                break;

            case Constants.TITLE_STATUS.GALLERY:
                if (GameObject.Find("Large_Container") != null && GameObject.Find("Large_Container").activeSelf)
                {
                    //tm.ClosePic();
                }
                else
                {
                    tm.CloseGallery();
                }
                break;

            case Constants.TITLE_STATUS.MUSIC:
                tm.CloseMusic();
                break;

            case Constants.TITLE_STATUS.RECOLL:
                tm.CloseRecollection();
                break;

            case Constants.TITLE_STATUS.ENDING:
                tm.CloseEnding();
                break;

            default:
                break;
            }
        }

        if (panels["System"].activeSelf)
        {
            //系统菜单打开时
            GameObject wc = panels["System"].transform.Find("Warning_Container").gameObject;
            if (wc != null && wc.activeSelf)
            {
                //警告窗口开启 则关闭
                wc.SetActive(false);
            }
            else
            {
                //否则关闭菜单
                panels["System"].GetComponent <SystemUIManager>().Close();
            }
        }
        else
        {
            //其他情形
            if (panels["Avg"].activeSelf || panels["Map"].activeSelf || panels["Edu"].activeSelf)
            {
                if (panels["Phone"].activeSelf)
                {
                    panels["Phone"].GetComponent <NoteUIManager>().ReturnIndex();
                }
                else
                {
                    //Debug.Log("Open Menu!");
                    panels["System"].SetActive(true);
                    panels["System"].GetComponent <SystemUIManager>().Open();
                }
            }
        }
    }