void Update()
 {
     if (Input.GetKeyDown(KeyCode.Tab))
     {
         bool isShow = uiMasterControl.isShowUI(UIEnum.GameInfoUI);
         showGameInfoUI(!isShow);
     }
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         bool isShow = uiMasterControl.isShowUI(UIEnum.GamePauseUI);
         showGamePauseUI(!isShow);
     }
     ;
     if (Input.GetKeyDown(KeyCode.M))
     {
         //  bool isShow = uiMasterControl.isShowUI(UIEnum.GameMusicUI);
         //   showGameMusicUI(!isShow);
     }
     ;
     if (Input.GetKeyDown(KeyCode.O))
     {
         bool isShow = uiMasterControl.isShowUI(UIEnum.GameOIUI);
         showGameOIUI(!isShow);
     }
 }
示例#2
0
    /// <summary>
    /// 检测是否开启秘密代码
    /// </summary>
    /// <returns></returns>
    private bool checkIsOpenSecretCode()
    {
        UIMasterControl uiControl = GetComponent <UIMasterControl>();

        if (uiControl != null)
        {
            bool isOpen = false;
            if (uiControl.isShowUI(UIEnum.MenuMainUI) ||
                uiControl.isShowUI(UIEnum.GameMainUI))
            {
                isOpen = true;
            }
            return(isOpen);
        }
        else
        {
            return(false);
        }
    }