Ejemplo n.º 1
0
    public virtual MessageBox.Result Show()
    {
        IntroMsgBoxDlg introMsgBoxDlg = (IntroMsgBoxDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INTROMSGBOX_DLG);

        if (introMsgBoxDlg != null)
        {
            introMsgBoxDlg.SetClose(false);
            this._Result = MessageBox.Result.IDLE;
            if (this.MBType == MessageBox.Type.OK)
            {
                introMsgBoxDlg.SetBtnChangeName(this.OK);
                introMsgBoxDlg.SetMsg(new Action <IntroMsgBoxDlg, object>(this._onOK), this, this.Title, this.Message, eMsgType.MB_OK);
            }
            else if (this.MBType == MessageBox.Type.OKCANCEL)
            {
                introMsgBoxDlg.SetBtnChangeName(this.OK, this.CANCEL);
                introMsgBoxDlg.SetMsg(new Action <IntroMsgBoxDlg, object>(this._onOK), this, new Action <IntroMsgBoxDlg, object>(this._onCancel), this, this.Title, this.Message, eMsgType.MB_OK_CANCEL);
            }
            int num  = (int)(GUICamera.width / 2f - introMsgBoxDlg.GetSize().x / 2f);
            int num2 = (int)(GUICamera.height / 2f - introMsgBoxDlg.GetSize().y / 2f);
            introMsgBoxDlg.SetLocation((float)num, (float)num2, 50f);
        }
        return(this._Result);
    }
Ejemplo n.º 2
0
 private void Exit(IntroMsgBoxDlg a_cthis, object a_oObject)
 {
     NrTSingleton <NrMainSystem> .Instance.QuitGame(false);
 }
Ejemplo n.º 3
0
    private void _OnMessageBoxOk(IntroMsgBoxDlg a_cthis, object a_oObject)
    {
        NrTSingleton <NrMainSystem> .Instance.QuitGame(false);

        TsLog.LogError("StageNPatch - Reset", new object[0]);
    }
Ejemplo n.º 4
0
 private void _onCancel(IntroMsgBoxDlg msgBox, object arg)
 {
     this._Result = MessageBox.Result.CANCEL;
     this.OnCancel();
 }
Ejemplo n.º 5
0
 private void _onOK(IntroMsgBoxDlg msgBox, object arg)
 {
     this._Result = MessageBox.Result.OK;
     this.OnOK();
 }
Ejemplo n.º 6
0
    public override void OnEnter()
    {
        string text = string.Format("{0} OnEnter OnEnter Memory = {1}MB", base.GetType().FullName, TsPlatform.Operator.GetAppMemory());

        TsPlatform.FileLog(text);
        TsLog.LogWarning(text, new object[0]);
        if (!TsPlatform.IsEditor && TsPlatform.IsAndroid && SystemInfo.processorCount < 2)
        {
            IntroMsgBoxDlg introMsgBoxDlg = (IntroMsgBoxDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INTROMSGBOX_DLG);

            if (introMsgBoxDlg != null)
            {
                string textFromPreloadText = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("10");

                introMsgBoxDlg.SetBtnChangeName(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8"));
                introMsgBoxDlg.SetMsg(null, null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8"), textFromPreloadText, eMsgType.MB_OK);
            }
        }
        if (TsPlatform.IsEditor)
        {
            NmMainFrameWork.AddBGM();
        }
        if (TsPlatform.IsAndroid)
        {
            PlayGamesPlatform.DebugLogEnabled = true;
            PlayGamesPlatform.Activate();
        }
        TsLog.Log("====== {0}.OnEnter", new object[]
        {
            base.GetType().FullName
        });
        Scene.ChangeSceneType(this.SceneType());
        if (Camera.main != null && Camera.main.gameObject != null)
        {
            DefaultCameraController component = Camera.main.gameObject.GetComponent <DefaultCameraController>();
            if (component == null)
            {
                Camera.main.gameObject.AddComponent <DefaultCameraController>();
            }
            GameObject target = GameObject.Find("MainFramework");
            UnityEngine.Object.DontDestroyOnLoad(target);
        }
        else
        {
            NrMainSystem.CheckAndSetReLoginMainCamera();
        }
        if (NrTSingleton <NrMainSystem> .Instance.m_ReLogin)
        {
            TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.WorldScene);
            TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.BattleScene);
            base.StartTaskSerial(this.LoadLoginSleep());
            base.StartTaskSerial(CommonTasks.LoadEmptyMainScene());
            base.StartTaskSerial(CommonTasks.ClearAudioStack());
            base.StartTaskSerial(CommonTasks.MemoryCleaning(true, 8));
            NmMainFrameWork.LoadImage();
            NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.LOGINBG_DLG);
        }
        base.StartTaskSerial(CommonTasks.SetGUIBehaviourScene());
        if (!NrTSingleton <NrMainSystem> .Instance.m_ReLogin && TsPlatform.IsEditor)
        {
            string         strFileName    = string.Format("{0}/../SystemData/ServerList.txt", Application.dataPath);
            NrConnectTable nrConnectTable = new NrConnectTable();
            nrConnectTable.AddServerList(strFileName);
        }
        if (!TsPlatform.IsEditor)
        {
            base.StartTaskSerial(this._RequestNoticeCheck());
            base.StartTaskSerial(this._RequestNoticePage());
            NrTSingleton <NrMainSystem> .Instance.m_bIsAutoLogin = true;
        }
        base.StartTaskSerial(this._RequestLoginNexonAuthorize());
        base.StartTaskSerial(this._StageProcess());
        base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true));
    }