public void setTime(long t)
        {
            kaifu_tm      = t;
            kaifu_tm_over = t + active_time_over;
            s_get_tm      = t + getRew_time;
            e_get_tm      = t + activeing_time;
            long time = muNetCleint.instance.CurServerTimeStamp - t;

            if (time < activeing_time)
            {
                Show_active = true;
            }
            else
            {
                Show_active = false;
            }

            if (time >= getRew_time && Show_active)
            {
                CanGetREW = true;
            }
            else
            {
                CanGetREW = false;
            }
            InterfaceMgr.doCommandByLua("a1_low_fightgame.onshow_newact", "ui/interfaces/low/a1_low_fightgame", Show_active);
        }
        public void enter_lvl(Variant data)
        {
            debug.Log("SCENE_LEVEL ---- 收到服务器创建完副本的消息,开始准备资源播放剧情,地图ID为" + data["mapid"]);
            //debug.Log(data.dump());

            //jason请求进入副本,要加载副本所有的相关的资源
            //通过level_id 来找到mapid ,预先加载好地图

            //sendData["mapid"] = curmapid;
            //sendData["ltpid"] = ltpid;


            Variant xml = SvrLevelConfig.instacne.get_level_data(data["ltpid"]);

            if (xml != null)
            {
                joinWorldInfo jinfo = this.g_mgr.g_netM.getObject(OBJECT_NAME.DATA_JOIN_WORLD) as joinWorldInfo;

                //这里的mapid是对应gconf中的mapid
                jinfo.m_data["mpid"] = xml["map"][0]["id"];


                /************修改有时进地图副本时游戏卡住的bug
                 * (调试下来是进副本的协议和播放剧情的模块逻辑冲突问题,解决方案:屏蔽掉剧情播放)***********/

                //LGLoadResource._instance.m_nLoaded_MapID = -1;
                //LGLoadResource._instance._onMapChgLoad();

                //MapModel.getInstance().curLevelId = data["ltpid"]._uint;
                //GRMap.LEVEL_PLOT_ID = data["ltpid"]._int;

                ////sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data);
                //GRMap.SetPoltOver_EnterLevel(delegate ()
                //{
                //    debug.Log("SCENE_LEVEL ---- 剧情播放完毕,进入地图" + jinfo.m_data["mpid"]);


                //    debug.Log("!!sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data)1!!" + " " + debug.count);
                //    sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data);
                //    LGLoadResource._instance.m_nLoaded_MapID = jinfo.m_data["mpid"];
                //});

                MapModel.getInstance().curLevelId = data["ltpid"]._uint;
                InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", data["ltpid"]._uint);
                MapModel.getInstance().curDiff = data["diff_lvl"]._uint;
                GRMap.LEVEL_PLOT_ID = data["ltpid"]._int;

                debug.Log("!!sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data)2!!");
                sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data);
                LGLoadResource._instance.m_nLoaded_MapID = -1;
            }
            else
            {
                MapModel.getInstance().curLevelId = 0;
                InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", 0);
                debug.Log("!!sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data)2!!");
                sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data);
                LGLoadResource._instance.m_nLoaded_MapID = -1;
            }
        }
Beispiel #3
0
        void onModeExp(Variant msgData)
        {
            PlayerModel.getInstance().exp = PlayerModel.getInstance().exp + msgData["mod_exp"];

            var maxExp = PlayerModel.getInstance().GetCurrMaxExp();

            if (maxExp != 0u)
            {
                PlayerModel.getInstance().exp = PlayerModel.getInstance().exp >= maxExp ? maxExp : PlayerModel.getInstance().exp;
            }

            debug.Log("经验增加:" + msgData["mod_exp"]);
            if (flytxt.instance)
            {
                flytxt.instance.fly("EXP+" + msgData["mod_exp"], 3);
            }
            if (a3_insideui_fb.instance != null)
            {
                a3_insideui_fb.instance.SetInfExp(msgData["mod_exp"]);
            }
            if (GameRoomMgr.getInstance().curRoom != null)
            {
                GameRoomMgr.getInstance().curRoom.onAddExp(msgData["mod_exp"]);
            }


            if (msgData.ContainsKey("cur_exp"))
            {
                PlayerModel.getInstance().exp = msgData["cur_exp"];
            }
            InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modExp", "model/PlayerModel", PlayerModel.getInstance().exp);
            dispatchEvent(GameEvent.Create(EVENT_ON_EXP_CHANGE, this, msgData));
        }
Beispiel #4
0
 public void showOrHideFires(string way, Variant data)
 {
     InterfaceMgr.doCommandByLua(this.str1 + way, this.path, new object[]
     {
         data
     });
 }
Beispiel #5
0
        public void enter_lvl(Variant data)
        {
            debug.Log("SCENE_LEVEL ---- 收到服务器创建完副本的消息,开始准备资源播放剧情,地图ID为" + data["mapid"]);
            Variant variant = SvrLevelConfig.instacne.get_level_data(data["ltpid"]);
            bool    flag    = variant != null;

            if (flag)
            {
                joinWorldInfo joinWorldInfo = this.g_mgr.g_netM.getObject("DATA_JOIN_WORLD") as joinWorldInfo;
                joinWorldInfo.m_data["mpid"] = variant["map"][0]["id"];
                MapModel.getInstance().curLevelId = data["ltpid"]._uint;
                InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", new object[]
                {
                    data["ltpid"]._uint
                });
                MapModel.getInstance().curDiff = data["diff_lvl"]._uint;
                GRMap.LEVEL_PLOT_ID = data["ltpid"]._int;
                debug.Log("!!sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data)2!!");
                base.sendRPC(242u, data);
                LGLoadResource._instance.m_nLoaded_MapID = -1;
            }
            else
            {
                MapModel.getInstance().curLevelId = 0u;
                InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", new object[]
                {
                    0
                });
                debug.Log("!!sendRPC(PKG_NAME.C2S_ENTER_LVL_RES, data)2!!");
                base.sendRPC(242u, data);
                LGLoadResource._instance.m_nLoaded_MapID = -1;
            }
        }
        public override void onEnd()
        {
            base.onEnd();
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            killnum  = 0;
            moneynum = 0;

            a3_insideui_fb.CloseInUI();

            //InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            // LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
        }
Beispiel #7
0
        private void onModeExp(Variant msgData)
        {
            ModelBase <PlayerModel> .getInstance().exp = ModelBase <PlayerModel> .getInstance().exp + msgData["mod_exp"];

            debug.Log("经验增加:" + msgData["mod_exp"]);
            bool flag = flytxt.instance;

            if (flag)
            {
                flytxt.instance.fly("EXP+" + msgData["mod_exp"], 3, default(Color), null);
            }
            bool flag2 = a3_insideui_fb.instance != null;

            if (flag2)
            {
                a3_insideui_fb.instance.SetInfExp(msgData["mod_exp"]);
            }
            bool flag3 = GameRoomMgr.getInstance().curRoom != null;

            if (flag3)
            {
                GameRoomMgr.getInstance().curRoom.onAddExp(msgData["mod_exp"]);
            }
            bool flag4 = msgData.ContainsKey("cur_exp");

            if (flag4)
            {
                ModelBase <PlayerModel> .getInstance().exp = msgData["cur_exp"];
            }
            InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modExp", "model/PlayerModel", new object[]
            {
                ModelBase <PlayerModel> .getInstance().exp
            });
            base.dispatchEvent(GameEvent.Create(PlayerInfoProxy.EVENT_ON_EXP_CHANGE, this, msgData, false));
        }
Beispiel #8
0
            internal void <Update> b__16_0()
            {
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(worldmap.EFFECT_CHUANSONG2);

                gameObject.transform.SetParent(SelfRole._inst.m_curModel, false);
                UnityEngine.Object.Destroy(gameObject, 2f);
                bool flag = a3_expbar.instance != null;

                if (flag)
                {
                    a3_expbar.instance.On_Btn_Down();
                }
                InterfaceMgr.doCommandByLua("a3_litemap_btns.setToggle", "ui/interfaces/floatui/a3_litemap_btns", new object[]
                {
                    true
                });
                bool flag2 = a3_skillopen.instance != null;

                if (flag2)
                {
                    a3_skillopen.instance.refreshInfo();
                }
                bool flag3 = a3_runeopen.instance != null;

                if (flag3)
                {
                    a3_runeopen.instance.refreshInfo();
                }
            }
Beispiel #9
0
        public override void onEnd()
        {
            base.onEnd();
            data.kmNum = 0;
            isOpen     = false;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);

            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);

            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
            //InterfaceMgr.getInstance().open(InterfaceMgr.BROADCASTING);
        }
Beispiel #10
0
 private void leave_lvl_res(Variant msgData)
 {
     MapModel.getInstance().curLevelId = 0;
     InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", 0);
     NetClient.instance.dispatchEvent(
         GameEvent.Create(PKG_NAME.S2C_LEAVE_LVL_RES, this, GameTools.CreateSwitchData("on_leave_lvl", msgData))
         );
 }
Beispiel #11
0
 private void leave_lvl_res(Variant msgData)
 {
     MapModel.getInstance().curLevelId = 0u;
     InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", new object[]
     {
         0
     });
     NetClient.instance.dispatchEvent(GameEvent.Create(250u, this, GameTools.CreateSwitchData("on_leave_lvl", msgData), false));
 }
Beispiel #12
0
 public static void openexpbar(object[] objs, Action forceDo)
 {
     if (a3_expbar.instance != null)
     {
         a3_expbar.instance.On_Btn_Down();
     }
     InterfaceMgr.doCommandByLua("a1_low_fightgame.setToggle", "ui/interfaces/low/a1_low_fightgame", true);
     //if (a3_liteMinimap.instance != null)
     //    a3_liteMinimap.instance.onTogglePlusClick(false);
 }
Beispiel #13
0
        public void onLoadInfo(Variant data)
        {
            debug.Log("pk模式的信息:" + data.dump());
            bool flag = data.ContainsKey("pk_state");

            if (flag)
            {
                ModelBase <PlayerModel> .getInstance().now_pkState = data["pk_state"];

                switch (ModelBase <PlayerModel> .getInstance().now_pkState)
                {
                case 0:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PEACE;

                    break;

                case 1:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PKALL;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().cid;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().cid;

                    break;

                case 2:
                    ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_TEAM;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().teamid;

                    ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().clanid;

                    break;
                }
                bool flag2 = a3_pkmodel._instance;
                if (flag2)
                {
                    a3_pkmodel._instance.ShowThisImage(data["pk_state"]);
                }
                bool flag3 = SelfRole.s_LockFX.gameObject != null;
                if (flag3)
                {
                    PkmodelAdmin.RefreshShow(SelfRole._inst.m_LockRole, false, false);
                }
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modPkState", "model/PlayerModel", new object[]
                {
                    ModelBase <PlayerModel> .getInstance().now_pkState,
                    true
                });
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMODEL);
                NewbieModel.getInstance().hide();
            }
        }
        void hidebtn()
        {
            //a3_expbar.instance?.BossRankingBtn.SetActive(false);
            //InterfaceMgr.getInstance().close(InterfaceMgr.A3_BOSSRANKING);
            EliteMonsterProxy.isfristover = false;
            string path = "ui/interfaces/low/a1_low_fightgame";

            InterfaceMgr.doCommandByLua("a1_low_fightgame.bossrkCl", path, null);
            EliteMonsterProxy.isfristover = false;
            CancelInvoke("hidebtn");
            isover = true;
        }
Beispiel #15
0
        public void modMaxHp(int max_v, int cur_v = -1)
        {
            int num = (cur_v < 0) ? this.hp : cur_v;

            this.data["max_hp"] = max_v;
            this.max_hp         = max_v;
            InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modHp", "model/PlayerModel", new object[]
            {
                num,
                ModelBase <PlayerModel> .getInstance().max_hp
            });
        }
Beispiel #16
0
        public override void onEnd()
        {
            base.onEnd();
            data.kmNum = 0;
            isOpen     = false;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);


            //InterfaceMgr.openByLua("herohead2");
            InterfaceMgr.doCommandByLua("a1_low_fightgame.show_heroih_cs", "ui/interfaces/low/a1_low_fightgame");

            if (tragethead.instance != null)
            {
                tragethead.instance.inFB = false;
            }
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
            a1_gamejoy.inst_skillbar.m_skillbar_hp_Add_btn.gameObject.SetActive(showHpBtn);

            if (a3_expbar.instance)
            {
                a3_expbar.instance.showBtnIcon(true);
            }

            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(true);
            }

            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(true);
            }

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(true);
            }
        }
        public void onLoadInfo(Variant data)
        {
            debug.Log("pk模式的信息:" + data.dump());
            if (data.ContainsKey("pk_state"))
            {
                PlayerModel.getInstance().now_pkState = data["pk_state"];
                switch (PlayerModel.getInstance().now_pkState)
                {
                case 0:
                    PlayerModel.getInstance().pk_state = PK_TYPE.PK_PEACE;
                    break;

                case 1:
                    PlayerModel.getInstance().pk_state      = PK_TYPE.PK_PKALL;
                    PlayerModel.getInstance().m_unPK_Param  = PlayerModel.getInstance().cid;
                    PlayerModel.getInstance().m_unPK_Param2 = PlayerModel.getInstance().cid;
                    break;

                case 2:
                    PlayerModel.getInstance().pk_state      = PK_TYPE.PK_TEAM;
                    PlayerModel.getInstance().m_unPK_Param  = PlayerModel.getInstance().teamid;
                    PlayerModel.getInstance().m_unPK_Param2 = PlayerModel.getInstance().clanid;
                    break;
                    //case 3:
                    //    PlayerModel.getInstance().pk_state = PK_TYPE.PK_LEGION;
                    //    PlayerModel.getInstance().m_unPK_Param = PlayerModel.getInstance().clanid;
                    //    break;
                    //case 4:
                    //    PlayerModel.getInstance().pk_state = PK_TYPE.PK_HERO;
                    //    //???
                    //    break;
                }
                if (a3_pkmodel._instance)
                {
                    a3_pkmodel._instance.ShowThisImage(data["pk_state"]);
                }
                if (SelfRole.s_LockFX.gameObject != null)
                {
                    PkmodelAdmin.RefreshShow(SelfRole._inst.m_LockRole);
                }

                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modPkState", "model/PlayerModel", PlayerModel.getInstance().now_pkState, true);

                InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMODEL);
                NewbieModel.getInstance().hide();
            }
        }
Beispiel #18
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.begintime = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.DRAGON);
            //if (a3_liteMinimap.instance != null)
            //    a3_liteMinimap.instance.refreshByUIState();
            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            a3_liteMinimap.instance.SetTaskInfoVisible(false);
            //InterfaceMgr.getInstance().close(InterfaceMgr.A3_HEROHEAD);
            //InterfaceMgr.getInstance().close(InterfaceMgr.A3_LITEMINIMAP);
            //InterfaceMgr.getInstance().close(InterfaceMgr.BROADCASTING);
        }
Beispiel #19
0
        private void onGetMerisRes(Variant data)
        {
            bool flag = data["res"] == 1;

            if (flag)
            {
                debug.Log(data.dump());
                Variant variant = new Variant();
                variant["zhuan"]  = data["zhuan"];
                variant["att_pt"] = data["att_pt"];
                bool flag2 = data.ContainsKey("lvl");
                if (flag2)
                {
                    variant["lvl"] = data["lvl"];
                }
                ModelBase <PlayerModel> .getInstance().lvUp(variant);

                ModelBase <PlayerModel> .getInstance().up_lvl = data["zhuan"]._uint;

                ModelBase <PlayerModel> .getInstance().pt_att = data["att_pt"]._int;

                ModelBase <PlayerModel> .getInstance().lvl = ((data["lvl"] == null) ? ModelBase <PlayerModel> .getInstance().lvl : data["lvl"]._uint);

                this.resetLvL();
                Variant variant2 = new Variant();
                bool    flag3    = data.ContainsKey("lvl");
                if (flag3)
                {
                    data["lvl"] = data["lvl"];
                }
                bool flag4 = data.ContainsKey("zhuan");
                if (flag4)
                {
                    data["zhuan"] = data["zhuan"];
                }
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modInfo", "model/PlayerModel", new object[]
                {
                    variant2
                });
                base.dispatchEvent(GameEvent.Create(ResetLvLProxy.EVENT_RESETLVL, this, variant, false));
            }
            else
            {
                Globle.err_output(data["res"]);
            }
        }
        public override void onEnd()
        {
            base.onEnd();
            isOpen = false;

            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            if (a3_expbar.instance)
            {
                a3_expbar.instance.showBtnIcon(true);
            }

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(true);
            }
            if (a3_herohead.instance)
            {
                a3_herohead.instance.showbtnIcon(true);
            }
            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(true);
            }
            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(true);
            }
            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.showbtnIcon", "ui/interfaces/low/a1_low_fightgame", true);
            InterfaceMgr.doCommandByLua("a1_high_fightgame.showbtnIcon", "ui/interfaces/high/a1_high_fightgame", true);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_LITEMINIBASEMAP);
            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
        }
Beispiel #21
0
        //public int money_get;
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(102);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(102, data);
            data.OnKillNumChange = (int i) => {
                if (a3_insideui_fb.instance != null)
                {
                    a3_insideui_fb.instance.SetKillNum(i, -1, 102);
                }
            };
            startMoney = PlayerModel.getInstance().money;
            MapModel.getInstance().curLevelId = 102;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame");
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame");
            //InterfaceMgr.getInstance().close(InterfaceMgr.BROADCASTING);

            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.begintime = entertimer;
            enterdata = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.Money);
            if (a3_insideui_fb.instance != null)
            {
                int n = enterdata["energy"];
                a3_insideui_fb.instance.SetGoldLeft(n);
            }

            if (data != null)
            {
                data.cycleCount++;
            }
        }
Beispiel #22
0
        public override void onEnd()
        {
            a3_insideui_fb.CloseInUI();
            base.onEnd();
            Variant variant = new Variant();

            variant["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a3_litemap_btns.refreshByUIState", "ui/interfaces/floatui/a3_litemap_btns", new object[]
            {
                variant
            });
            InterfaceMgr.doCommandByLua("a3_litemap.refreshByUIState", "ui/interfaces/floatui/a3_litemap", new object[]
            {
                variant
            });
            a3_liteMinimap.instance.SetTaskInfoVisible(true);
        }
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(105);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(105, data);
            data.OnKillNumChange = (int i) => {
                if (a3_insideui_fb.instance != null)
                {
                    a3_insideui_fb.instance.SetKillNum(i);
                }
            };
            startExp = PlayerModel.getInstance().exp;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);

            //InterfaceMgr.getInstance().close(InterfaceMgr.BROADCASTING);

            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.begintime = entertimer;
            enterdata = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.ZHSLY);

            LevelProxy.getInstance().getAwd_zhs(1);
            if (data != null)
            {
                data.cycleCount++;
            }
        }
Beispiel #24
0
        public void refreshInfo(int id, float x, float y)
        {
            base.gameObject.SetActive(true);
            this.ig_icon  = base.transform.FindChild("mover/icon").GetComponent <Image>();
            this.ig_icon1 = base.transform.FindChild("icon").GetComponent <Image>();
            string path = "icon/func_open/" + id;

            this.ig_icon.sprite  = (Resources.Load(path, typeof(Sprite)) as Sprite);
            this.ig_icon1.sprite = (Resources.Load(path, typeof(Sprite)) as Sprite);
            this.ig_icon.gameObject.SetActive(true);
            base.CancelInvoke("timeGo");
            base.Invoke("timeGo", 3.3f);
            this.runAni(x, y);
            bool flag = a3_expbar.instance != null;

            if (flag)
            {
                a3_expbar.instance.On_Btn_Down();
            }
            InterfaceMgr.doCommandByLua("a3_litemap_btns.setToggle", "ui/interfaces/floatui/a3_litemap_btns", new object[]
            {
                true
            });
            bool autofighting = SelfRole.fsm.Autofighting;

            if (autofighting)
            {
                bool flag2 = StateInit.Instance.IsOutOfAutoPlayRange();
                if (flag2)
                {
                    SelfRole.fsm.Stop();
                }
                else
                {
                    SelfRole.fsm.Resume();
                }
            }
            else
            {
                SelfRole.fsm.Stop();
            }
            a3_task_auto.instance.stopAuto = true;
            this.is_show = true;
            InterfaceMgr.getInstance().close(InterfaceMgr.DIALOG);
        }
Beispiel #25
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.begintime = (double)muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.DRAGON);
            Variant variant = new Variant();

            variant["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a3_litemap_btns.refreshByUIState", "ui/interfaces/floatui/a3_litemap_btns", new object[]
            {
                variant
            });
            InterfaceMgr.doCommandByLua("a3_litemap.refreshByUIState", "ui/interfaces/floatui/a3_litemap", new object[]
            {
                variant
            });
            a3_liteMinimap.instance.SetTaskInfoVisible(false);
        }
Beispiel #26
0
        public override void onEnd()
        {
            a3_insideui_fb.CloseInUI();
            base.onEnd();
            //if (a1_gamejoy.inst_joystick != null)
            //    a1_gamejoy.inst_joystick.OnDragOut();
            //if (a3_liteMinimap.instance != null)
            //    a3_liteMinimap.instance.refreshByUIState();
            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            a3_liteMinimap.instance.SetTaskInfoVisible(true);
            //InterfaceMgr.getInstance().open(InterfaceMgr.A3_HEROHEAD);
            //InterfaceMgr.getInstance().open(InterfaceMgr.A3_LITEMINIMAP);
            //InterfaceMgr.getInstance().open(InterfaceMgr.BROADCASTING);
            //InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
        }
        public void refreshInfo(int id, float x, float y)
        {
            this.gameObject.SetActive(true);

            ig_icon  = transform.FindChild("mover/icon").GetComponent <Image>();
            ig_icon1 = transform.FindChild("icon").GetComponent <Image>();
            string file = "icon_func_open_" + id;

            ig_icon.sprite  = GAMEAPI.ABUI_LoadSprite(file);
            ig_icon1.sprite = GAMEAPI.ABUI_LoadSprite(file);
            ig_icon.gameObject.SetActive(true);

            CancelInvoke("timeGo");
            Invoke("timeGo", 3.3f);

            runAni(x, y);

            if (a3_expbar.instance != null)
            {
                a3_expbar.instance.On_Btn_Down();
            }
            InterfaceMgr.doCommandByLua("a1_low_fightgame.setToggle", "ui/interfaces/low/a1_low_fightgame", true);
            // if (a3_liteMinimap.instance != null) a3_liteMinimap.instance.onTogglePlusClick(false);
            if (SelfRole.fsm.Autofighting)
            {
                if (StateInit.Instance.IsOutOfAutoPlayRange())
                {
                    SelfRole.fsm.Stop();
                }
                else
                {
                    SelfRole.fsm.Resume();
                }
            }
            else
            {
                SelfRole.fsm.Stop();
            }

            a3_task_auto.instance.stopAuto = true;
            is_show = true;
            InterfaceMgr.getInstance().close(InterfaceMgr.DIALOG);
        }
 void onChangeLine(Variant data)
 {
     //0就是1线,按下标分
     debug.Log("收到转线信息:" + data.dump());
     if (data.ContainsKey("change_limit"))
     {
         //冷却中
         flytxt.instance.fly(ContMgr.getCont("ChangeLineProxy0") + data["change_limit"] + ContMgr.getCont("ChangeLineProxy1"), 1);
     }
     else
     {
         flytxt.instance.fly(ContMgr.getCont("ChangeLineProxy2") + data["line"] + 1 + ContMgr.getCont("ChangeLineProxy3"), 1);
         if (a3_mapChangeLine.instance != null)
         {
             a3_mapChangeLine.instance.onBtnCancelClick(null);
         }
         PlayerModel.getInstance().line = data["line"];
         int line = data["line"] + 1;
         InterfaceMgr.doCommandByLua("a1_high_fightgame.change__Line", "ui/interfaces/high/a1_high_fightgame", line.ToString());
     }
 }
        void onGetMerisRes(Variant data)
        {
            if (data["res"] == 1)
            {
                debug.Log(data.dump());
                Variant resetData = new Variant();
                resetData["zhuan"]  = data["zhuan"];
                resetData["att_pt"] = data["att_pt"];
                if (data.ContainsKey("lvl"))
                {
                    resetData["lvl"] = data["lvl"];
                }
                PlayerModel.getInstance().lvUp(resetData);
                PlayerModel.getInstance().up_lvl = data["zhuan"]._uint;
                PlayerModel.getInstance().pt_att = data["att_pt"]._int;
                PlayerModel.getInstance().lvl    = data["lvl"] == null?PlayerModel.getInstance().lvl : data["lvl"]._uint;

                if (data.ContainsKey("exp"))
                {
                    PlayerModel.getInstance().exp = data["exp"];
                }

                resetLvL();
                Variant _data = new Variant();
                if (data.ContainsKey("lvl"))
                {
                    data["lvl"] = data["lvl"];
                }
                if (data.ContainsKey("zhuan"))
                {
                    data["zhuan"] = data["zhuan"];
                }
                InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modInfo", "model/PlayerModel", _data);
                dispatchEvent(GameEvent.Create(EVENT_RESETLVL, this, resetData));
            }
            else
            {
                Globle.err_output(data["res"]);
            }
        }
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            enterdata  = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.Normal);
            killnum  = 0;
            moneynum = 0;
        }