Exemplo n.º 1
0
    public override void OnPrepareSceneChange()
    {
        NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType());
        NrLoadPageScreen.StepUpMain(1);
        this._mapLoader.Reset();
        StageWorld.m_eBattleRoomType = eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NONE;
        if (Scene.CurScene != Scene.Type.BATTLE)
        {
            NrLoadPageScreen.ShowHideLoadingImg(true);
        }
        else
        {
            StageWorld.m_eBattleRoomType = Battle.BATTLE.BattleRoomtype;
            if (Battle.BATTLE.Observer || StageWorld.m_eBattleRoomType == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PREVIEW)
            {
                NrLoadPageScreen.ShowHideLoadingImg(true);
            }
        }
        if ((Scene.PreScene == Scene.Type.BATTLE || Scene.CurScene == Scene.Type.BATTLE || Scene.PreScene == Scene.Type.SOLDIER_BATCH || Scene.CurScene == Scene.Type.SOLDIER_BATCH) && (TsPlatform.IsLowSystemMemory || TsPlatform.IsEditor))
        {
            NrTSingleton <NkClientLogic> .Instance.CharWarpRequest(0);

            GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ();
            gS_WARP_REQ.nMode = 1;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ);
        }
        NmMainFrameWork.DeleteImage();
        base.ResetCoTasks();
    }
Exemplo n.º 2
0
    public override void OnClose()
    {
        if (this.m_bShowPlunderDlg && !NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERMAIN_DLG))
        {
            PlunderMainDlg plunderMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.PLUNDERMAIN_DLG) as PlunderMainDlg;

            if (plunderMainDlg != null)
            {
                plunderMainDlg.ShowInfiBattle();
            }
        }
        NrTSingleton <FiveRocksEventManager> .Instance.BattleResult(eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PLUNDER, this.m_fBattleTime, this.m_nInjurySolCount);

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_bNoMove)
        {
            GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ();
            gS_WARP_REQ.nMode = 1;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ);
        }
        if (this.m_goRankEffectObject != null)
        {
            UnityEngine.Object.DestroyObject(this.m_goRankEffectObject);
            this.m_goRankEffectObject = null;
        }
    }
Exemplo n.º 3
0
    public void ClickAgitOut(IUIObject obj)
    {
        GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ();

        gS_WARP_REQ.nMode                = 0;
        gS_WARP_REQ.nGateIndex           = 0;
        gS_WARP_REQ.nWorldMapWarp_MapIDX = 2;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ);
    }
Exemplo n.º 4
0
    public void Warp(uint effectNum)
    {
        if (this.m_nEffectNum != effectNum)
        {
            return;
        }
        if (-1 < this.m_nGateIndex && -1 < this.m_nMapIndex)
        {
            NrTSingleton <NkClientLogic> .Instance.CharWarpRequest(0);

            GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ();
            gS_WARP_REQ.nGateIndex           = this.m_nGateIndex;
            gS_WARP_REQ.nWorldMapWarp_MapIDX = this.m_nMapIndex;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ);
            this.m_bWarp      = false;
            this.m_nGateIndex = -1;
            this.m_nMapIndex  = -1;
            this.m_nEffectNum = 0u;
        }
    }
Exemplo n.º 5
0
    private void OnTriggerEnter(Collider kCollider)
    {
        if (0 >= this.nGateIndex)
        {
            return;
        }
        if (NrTSingleton <NkClientLogic> .Instance.GetWarpGateIndex() == this.nGateIndex)
        {
            return;
        }
        NrCharInfoAdaptor component = kCollider.gameObject.GetComponent <NrCharInfoAdaptor>();

        if (null == component)
        {
            return;
        }
        if (component.CharInfo.Get_Char_ID() != 1)
        {
            return;
        }
        GATE_INFO gateInfo = NrTSingleton <NrBaseTableManager> .Instance.GetGateInfo(this.nGateIndex.ToString());

        if (gateInfo == null)
        {
            return;
        }
        if (gateInfo.SRC_MAP_IDX != NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kCharMapInfo.m_nMapIndex)
        {
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(gateInfo.GATE_IDX, 0))
        {
            return;
        }
        GS_WARP_REQ gS_WARP_REQ = new GS_WARP_REQ();

        gS_WARP_REQ.nGateIndex = this.nGateIndex;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WARP_REQ, gS_WARP_REQ);
        NrTSingleton <NkClientLogic> .Instance.CharWarpRequest(this.nGateIndex);
    }