コード例 #1
0
    /** esc退出方法 */
    protected virtual bool escDown()
    {
        if (GameC.nativeUI == null)
        {
            return(false);
        }
        Reporter reporter = GameC.nativeUI.getReporter();

        if (CommonSetting.useReporter && reporter != null && reporter.show)
        {
            reporter.hideReporter();
            return(true);
        }
        GMCommandUI gMCommandUI = GameC.nativeUI.getGMCommandUI();

        if (CommonSetting.useDebug && gMCommandUI != null && gMCommandUI.isShow())
        {
            gMCommandUI.hide();
            return(true);
        }
        if (CommonSetting.useReporter && reporter != null && !reporter.show)
        {
            reporter.showReporter();
            return(true);
        }
        //其他

        return(false);
    }
コード例 #2
0
    public void init()
    {
        if (CommonSetting.useDebug)
        {
            _gmCommandUI = new GMCommandUI();
            _gmCommandUI.init();

            // Ctrl.setPrintFunc(_gmCommandUI.onPrint);
        }

        _selectServerUI = new SelectServerUI();
    }
コード例 #3
0
ファイル: InfoControl.cs プロジェクト: shineTeam7/home3
    /** 执行特殊信息码 */
    protected virtual void doInfoCode(int code, string str)
    {
        switch (code)
        {
        case InfoCodeType.LoginGameFailed_dataVersionError:
        {
            alertForExit(str);
        }
        break;

        case InfoCodeType.LoginGameFailed_repeatLogin:
        case InfoCodeType.LoginGameFailed_playerAlreadyLogined:
        case InfoCodeType.LoginGameFailed_isBlock:
        case InfoCodeType.SwitchGameFailed_noSwitchData:
        case InfoCodeType.SwitchGameFailed_notRightState:

        case InfoCodeType.PlayerExit_crowedDown:
        case InfoCodeType.PlayerExit_beKicked:

        case InfoCodeType.LoginGameFailed_resourceVersionLow:                //版本过低也返回登录
        case InfoCodeType.OfflineWorkFailed:

        case InfoCodeType.LoginGameFailed_playerIDNotMatch:
        case InfoCodeType.LoginGameFailed_playerNotExist:
        {
            alertForBackLogin(str, false);
        }
        break;

        case InfoCodeType.PlayerExit_serverClose:
        case InfoCodeType.PlayerExit_socketClose:

        case InfoCodeType.LoginGameFailed_noLoginData:
        case InfoCodeType.LoginGameFailed_isLogining:

        {
            alertForBackLogin(str, true);
        }
        break;

        case InfoCodeType.PlayerExit_initiative:
        {
            GameC.main.setExit();
        }
        break;

        case InfoCodeType.ClientGMHelp:
        case InfoCodeType.ClientGMSuccess:
        {
            GMCommandUI gmCommandUi = GameC.nativeUI.getGMCommandUI();

            if (gmCommandUi != null)
            {
                gmCommandUi.onPrint(str);
            }
        }
        break;

        case InfoCodeType.ClientGMFailed:
        {
            GMCommandUI gmCommandUi = GameC.nativeUI.getGMCommandUI();

            if (gmCommandUi != null)
            {
                gmCommandUi.onPrint("<color=red>" + str + "</color>");
            }
        }
        break;
        }
    }