void SetApply_Info_Tip() { Apply_Info info; if (A3_cityOfWarModel.getInstance().checkMineClan() != null) { info = A3_cityOfWarModel.getInstance().checkMineClan(); } else { info = A3_cityOfWarModel.getInstance().GetApplyInfo_One(3); } if (info == null) { Minimum = 0; } else { Minimum = info.apply_num; } mineCost = Minimum + A3_cityOfWarModel.getInstance().min_cost; if (mineCost > A3_LegionModel.getInstance().myLegion.gold) { mineCost = 0; } inputTip.transform.FindChild("lastcount").GetComponent <Text>().text = Minimum.ToString(); inputCost.text = mineCost.ToString(); }
void refreshTime_Apply() { DateTime dateTime = DateTime.Now; int hh = A3_cityOfWarModel.getInstance().apply_tm_end_h; DateTime overTime = DateTime.Parse(dateTime.ToString("yyyy/MM/dd") + " " + hh.ToString() + ":00:00"); TimeSpan span = overTime - dateTime; if (span.Hours > 0) { stageCon.FindChild("1/time/tet").GetComponent <Text>().text = span.Hours + ContMgr.getCont("hour") + span.Minutes + ContMgr.getCont("mine") + span.Seconds + ContMgr.getCont("miao"); } else if (span.Hours <= 0 && span.Minutes > 0) { stageCon.FindChild("1/time/tet").GetComponent <Text>().text = span.Minutes + ContMgr.getCont("mine") + span.Seconds + ContMgr.getCont("miao"); } else if (span.Hours <= 0 && span.Minutes <= 0) { stageCon.FindChild("1/time/tet").GetComponent <Text>().text = span.Seconds + ContMgr.getCont("miao"); } if (span.Hours <= 0 && span.Minutes <= 0 && span.Seconds < 0) { //时间到,刷新界面 Debug.LogError(dateTime); refreshTime_Stage(); CancelInvoke("refreshTime_Apply"); } }
void SetFor_SkyCity() { if (A3_cityOfWarModel.getInstance().def_clanid == 0) { this.transform.FindChild("cityinfo/LegionName/null").gameObject.SetActive(true); this.transform.FindChild("cityinfo/LegionName/have").gameObject.SetActive(false); this.transform.FindChild("cityinfo/Santoinfo/null").gameObject.SetActive(true); this.transform.FindChild("cityinfo/Santoinfo/have").gameObject.SetActive(false); } else { this.transform.FindChild("cityinfo/LegionName/null").gameObject.SetActive(false); this.transform.FindChild("cityinfo/LegionName/have").gameObject.SetActive(true); this.transform.FindChild("cityinfo/Santoinfo/null").gameObject.SetActive(false); this.transform.FindChild("cityinfo/Santoinfo/have").gameObject.SetActive(true); this.transform.FindChild("cityinfo/LegionName/have/lvl").GetComponent <Text>().text = "LV" + A3_cityOfWarModel.getInstance().clan_lvl; this.transform.FindChild("cityinfo/LegionName/have/tet").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().clan_name; this.transform.FindChild("cityinfo/Santoinfo/have/lvl").GetComponent <Text>().text = ContMgr.getCont("worldmap_lv", new List <string> { A3_cityOfWarModel.getInstance().Castellan_zhuan.ToString(), A3_cityOfWarModel.getInstance().Castellan_lvl.ToString() }); this.transform.FindChild("cityinfo/Santoinfo/have/name").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().Castellan_name; this.transform.FindChild("cityinfo/Santoinfo/have/combat/tet").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().Castellan_combpt.ToString(); this.transform.FindChild("cityinfo/Santoinfo/have/icon").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_hero_" + A3_cityOfWarModel.getInstance().Castellan_carr); } }
void onFbInfo(GameEvent e) { Variant data = e.data; a3_insideui_fb.instance?.SetFbInfo(); if (PlayerModel.getInstance().lvlsideid == 1) { if (A3_cityOfWarModel.getInstance().door_open) { SelfRole._inst.setNavLay(NavmeshUtils.listARE[1] + NavmeshUtils.listARE[2]); door.SetActive(false); } else { SelfRole._inst.setNavLay(NavmeshUtils.listARE[1]); door.SetActive(true); } } else if (PlayerModel.getInstance().lvlsideid == 2) { if (A3_cityOfWarModel.getInstance().door_open) { door.SetActive(false); } else { door.SetActive(true); } } }
void Refsignal() { if (A3_cityOfWarModel.getInstance().signalList.Count != 0) { foreach (signalInfo info in A3_cityOfWarModel.getInstance().signalList) { info.cd--; if (info.cd <= 0) { removeList.Add(info); if (info.signalObj != null) { Destroy(info.signalObj); } } } foreach (signalInfo removeObj in removeList) { if (A3_cityOfWarModel.getInstance().signalList.Contains(removeObj)) { A3_cityOfWarModel.getInstance().signalList.Remove(removeObj); } } removeList.Clear(); if (A3_cityOfWarModel.getInstance().signalList.Count <= 0) { a3_insideui_fb.instance.changesignal(0); } } }
void OnDestroy() { A3_cityOfWarProxy.getInstance().removeEventListener(A3_cityOfWarProxy.REFRESHFBINFO, onFbInfo); PlayerModel.getInstance().lvlsideid = 0; PlayerModel.getInstance().inCityWar = false; A3_cityOfWarProxy.getInstance().sendProxy(1); InterfaceMgr.getInstance().close(InterfaceMgr.A3_LITEMINIBASEMAP1); CancelInvoke("refersh_Nav"); CancelInvoke("Refsignal"); A3_cityOfWarModel.getInstance().signalList.Clear(); }
private void enter_lvl_res(Variant msgData) { debug.Log("Level Enter ==============================="); debug.Log(msgData.dump()); uint ltpid = msgData["ltpid"]; Variant d = SvrLevelConfig.instacne.get_level_data(ltpid); if (d.ContainsKey("public") && d["public"] == 1) { is_open = true; } else { is_open = false; } if (d.ContainsKey("shengwu")) { if (d["shengwu"] == 1) { open_pic = true; string icon = d["icon"]; codes = icon.Split(','); icon1 = d["des"]; codess = icon1.Split(','); } else { open_pic1 = true; string icon = d["icon"]; codes = icon.Split(','); icon1 = d["des"]; codess = icon1.Split(','); } } if (ltpid == 107 || ltpid == 9000)//竞技场 据点战场 { starTime = msgData["start_tm"]._int64; // Debug.LogError("UUUU"+ (wait -( muNetCleint.instance.CurServerTimeStamp-msgData["start_tm"]._int64 ))); } if (ltpid == 8000)//城战 { A3_cityOfWarModel.getInstance().starTime = msgData["start_tm"]._int64; A3_cityOfWarModel.getInstance().endTime = msgData["end_tm"]._int64; } a3_counterpart.lvl = msgData["diff_lvl"]; //GameSession(this.session).logicClient.logicInGame.lgGD_levels.on_enter_lvl_res(msgData); NetClient.instance.dispatchEvent( GameEvent.Create(PKG_NAME.S2C_ENTER_LVL_RES, this, GameTools.CreateSwitchData("on_enter_lvl_res", msgData)) ); }
void refreshTime_Waring() { DateTime dateTime = DateTime.Now; int hh = A3_cityOfWarModel.getInstance().open_tm_end_h; int mm = A3_cityOfWarModel.getInstance().open_tm_end_m; DateTime overTime = DateTime.Parse(dateTime.ToString("yyyy/MM/dd") + " " + hh.ToString() + ":" + mm.ToString() + ":00"); TimeSpan span = overTime - dateTime; stageCon.FindChild("3/time/tet").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().GetTimestr(span.Hours) + ":" + A3_cityOfWarModel.getInstance().GetTimestr(span.Minutes) + ":" + A3_cityOfWarModel.getInstance().GetTimestr(span.Seconds); if (span.Hours <= 0 && span.Minutes <= 0 && span.Seconds < 0) { //时间到,刷新界面 refreshTime_Stage(); CancelInvoke("refreshTime_Waring"); } }
void refreshTime_WarOver() { DateTime dateTime = DateTime.Now; if (dateTime.DayOfWeek == A3_cityOfWarModel.getInstance().GetWeek(A3_cityOfWarModel.getInstance().apply_tm_day)) { int hh = A3_cityOfWarModel.getInstance().apply_tm_start_h; DateTime overTime = DateTime.Parse(dateTime.ToString("yyyy/MM/dd") + " " + hh.ToString() + ":00:00"); TimeSpan span = overTime - dateTime; if (span.Hours <= 0 && span.Minutes <= 0 && span.Seconds < 0) { //时间到,刷新界面 refreshTime_Stage(); CancelInvoke("refreshTime_WarOver"); } } }
void RefreshApply(GameEvent e) { for (int i = 0; i < apply_clan_Con.childCount; i++) { Destroy(apply_clan_Con.GetChild(i).gameObject); } for (int i = 0; i < A3_cityOfWarModel.getInstance().apply_list.Count; i++) { GameObject clon = Instantiate(apply_clan_item) as GameObject; clon.SetActive(true); clon.transform.SetParent(apply_clan_Con); clon.transform.FindChild("idx").GetComponent <Text>().text = (i + 1).ToString(); Apply_Info info = A3_cityOfWarModel.getInstance().GetApplyInfo_One(i + 1); clon.transform.FindChild("lvl/tet").GetComponent <Text>().text = info.clan_lvl.ToString(); clon.transform.FindChild("name").GetComponent <Text>().text = info.clan_name; clon.transform.FindChild("money").GetComponent <Text>().text = info.apply_num.ToString(); } }
void Refresh(GameEvent e) { //暂时只有天启城,先不做区分判断 SetFor_SkyCity(); Variant data = e.data; if (data.ContainsKey("llid")) { if (A3_cityOfWarModel.getInstance().llid != data["llid"]) { refreshTime_Stage(); } } if (data.ContainsKey("apply_list")) { RefreshApply(null); } }
void SetTime_Prepare() { string str = ""; switch (A3_cityOfWarModel.getInstance().open_tm_day) { case 1: str = ContMgr.getCont("week1"); break; case 2: str = ContMgr.getCont("week2"); break; case 3: str = ContMgr.getCont("week3"); break; case 4: str = ContMgr.getCont("week4"); break; case 5: str = ContMgr.getCont("week5"); break; case 6: str = ContMgr.getCont("week6"); break; case 7: str = ContMgr.getCont("week7"); break; } str += A3_cityOfWarModel.getInstance().open_tm_start_h + ContMgr.getCont("shi"); if (A3_cityOfWarModel.getInstance().open_tm_start_m > 0) { str += A3_cityOfWarModel.getInstance().GetTimestr(A3_cityOfWarModel.getInstance().open_tm_start_m) + ContMgr.getCont("mine"); } str += ContMgr.getCont("kaishi"); stageCon.FindChild("2/time/tet").GetComponent <Text>().text = str; }
void RefreshPrepare(GameEvent e) { foreach (int id in def_objList.Keys) { if (A3_cityOfWarModel.getInstance().deflist.ContainsKey(id)) { SXML Xml = XMLMgr.instance.GetSXML("clanwar.def_info", "id==" + id); def_objList[id].transform.FindChild("lvl/tet").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().deflist[id]._lvl.ToString(); SXML Xml_lvl = Xml.GetNode("lvl", "lv==" + A3_cityOfWarModel.getInstance().deflist[id]._lvl); def_objList[id].transform.FindChild("att").GetComponent <Text>().text = Xml.getString("value_name") + "+" + Xml_lvl.getInt("value"); } else { SXML Xml = XMLMgr.instance.GetSXML("clanwar.def_info", "id==" + id); def_objList[id].transform.FindChild("lvl/tet").GetComponent <Text>().text = "0"; def_objList[id].transform.FindChild("att").GetComponent <Text>().text = Xml.getString("value_name") + "+" + "0"; } } SetMoney(); }
void SetWinBtn(TimeType type) { switch (type) { case TimeType.ApplyTime: this.transform.FindChild("letters/apply/local").gameObject.SetActive(false); this.transform.FindChild("letters/Prepare/local").gameObject.SetActive(true); if (A3_LegionModel.getInstance().myLegion.id != A3_cityOfWarModel.getInstance().def_clanid) { this.transform.FindChild("viewbg/applyview/apply_btn").gameObject.SetActive(true); } else { this.transform.FindChild("viewbg/applyview/apply_btn").gameObject.SetActive(false); } this.transform.FindChild("viewbg/applyview/infb_btn").gameObject.SetActive(false); break; case TimeType.PrepareTime: this.transform.FindChild("letters/apply/local").gameObject.SetActive(false); this.transform.FindChild("letters/Prepare/local").gameObject.SetActive(false); this.transform.FindChild("viewbg/applyview/apply_btn").gameObject.SetActive(false); this.transform.FindChild("viewbg/applyview/infb_btn").gameObject.SetActive(false); break; case TimeType.WarStart: this.transform.FindChild("letters/apply/local").gameObject.SetActive(false); this.transform.FindChild("letters/Prepare/local").gameObject.SetActive(true); this.transform.FindChild("viewbg/applyview/apply_btn").gameObject.SetActive(false); this.transform.FindChild("viewbg/applyview/infb_btn").gameObject.SetActive(true); break; case TimeType.WarOver: this.transform.FindChild("letters/apply/local").gameObject.SetActive(false); this.transform.FindChild("letters/Prepare/local").gameObject.SetActive(true); this.transform.FindChild("viewbg/applyview/apply_btn").gameObject.SetActive(false); this.transform.FindChild("viewbg/applyview/infb_btn").gameObject.SetActive(false); break; } }
public void SetSignal() { foreach (signalInfo info in A3_cityOfWarModel.getInstance().signalList) { if (info != null && info.cd >= 1) { if (info.signalObj == null) { GameObject obj = Instantiate(this.transform.FindChild("panel_map/signal/" + info.signalType).gameObject) as GameObject; obj.SetActive(true); int x2 = (int)info.x; int y2 = (int)info.y; Vector3 vec = new Vector3(x2, y2, 0); // SceneCamera.getTeamPosOnMinMap(x2, y2, curMiniMap.mapScale); // vec = mapRotation * vec; debug.Log("oooooo" + vec); obj.transform.localPosition = vec; info.signalObj = obj; // obj.transform.SetParent(TeammateCon, false); obj.transform.SetParent(this.transform.FindChild("panel_map/signalCon"), false); } } } }
void SetMoney() { if (A3_cityOfWarModel.getInstance().deflist.ContainsKey(curSelectId)) { int lvl = A3_cityOfWarModel.getInstance().deflist[curSelectId]._lvl + 1; SXML Xml = XMLMgr.instance.GetSXML("clanwar.def_info", "id==" + curSelectId); if (Xml == null) { return; } SXML Xml_lvl = Xml.GetNode("lvl", "lv==" + lvl); if (Xml_lvl != null) { this.transform.FindChild("viewbg/Prepareview/apply_btn/1").gameObject.SetActive(true); this.transform.FindChild("viewbg/Prepareview/apply_btn/2").gameObject.SetActive(false); this.transform.FindChild("viewbg/Prepareview/apply_btn/1/money").GetComponent <Text>().text = Xml_lvl.getInt("cost").ToString(); } else { this.transform.FindChild("viewbg/Prepareview/apply_btn/1").gameObject.SetActive(false); this.transform.FindChild("viewbg/Prepareview/apply_btn/2").gameObject.SetActive(true); } } else { this.transform.FindChild("viewbg/Prepareview/apply_btn/1").gameObject.SetActive(true); this.transform.FindChild("viewbg/Prepareview/apply_btn/2").gameObject.SetActive(false); int lvl = 1; SXML Xml = XMLMgr.instance.GetSXML("clanwar.def_info", "id==" + curSelectId); if (Xml == null) { return; } SXML Xml_lvl = Xml.GetNode("lvl", "lv==" + lvl); this.transform.FindChild("viewbg/Prepareview/apply_btn/1/money").GetComponent <Text>().text = Xml_lvl.getInt("cost").ToString(); } }
void setWar_Result() { stageCon.FindChild("4/time/tet").GetComponent <Text>().text = A3_cityOfWarModel.getInstance().GetStage_Str(); }
public override void init() { Con_view = this.transform.FindChild("citylist/scroll/content"); stageCon = this.transform.FindChild("cityinfo/citystage"); inputTip = transform.FindChild("tip").gameObject; apply_clan_item = this.transform.FindChild("viewbg/applyview/scroll/item").gameObject; helpCon = this.transform.FindChild("helpCon").gameObject; apply_clan_Con = this.transform.FindChild("viewbg/applyview/scroll/content"); inputCost = inputTip.transform.FindChild("bug/InputField/Text").GetComponent <Text>(); new BaseButton(transform.FindChild("close")).onClick = (GameObject go) => { InterfaceMgr.getInstance().close(this.uiName); }; applyview = this.transform.FindChild("viewbg/applyview"); Prepareview = this.transform.FindChild("viewbg/Prepareview"); for (int i = 0; i < Con_view.childCount; i++) { new BaseButton(Con_view.GetChild(i)).onClick = (GameObject go) => { onTab(go.name); }; } new BaseButton(this.transform.FindChild("letters/apply")).onClick = (GameObject go) => { SetLetter_btn(1); }; new BaseButton(this.transform.FindChild("letters/Prepare")).onClick = (GameObject go) => { SetLetter_btn(2); change_Id(1); }; new BaseButton(this.transform.FindChild("letters/Prepare/local")).onClick = (GameObject go) => { flytxt.instance.fly(ContMgr.getCont("uilayer_A3_cityOfWar_nllopen"));//"备战阶段才可以此操作" }; new BaseButton(this.transform.FindChild("viewbg/applyview/apply_btn")).onClick = (GameObject go) => { if (A3_LegionModel.getInstance().myLegion.clanc < 3) { flytxt.flyUseContId("clan_8"); return; } inputTip.SetActive(true); SetApply_Info_Tip(); }; new BaseButton(this.transform.FindChild("viewbg/applyview/infb_btn")).onClick = (GameObject go) => { //进入副本 A3_cityOfWarProxy.getInstance().sendInfb(); }; new BaseButton(inputTip.transform.FindChild("btn_add")).onClick = (GameObject go) => { mineCost = mineCost + A3_cityOfWarModel.getInstance().one_change_cost; if (mineCost > A3_LegionModel.getInstance().myLegion.gold) { mineCost = mineCost - A3_cityOfWarModel.getInstance().one_change_cost; flytxt.instance.fly(ContMgr.getCont("A3_cityOfWar_nullMoney")); return; } if (mineCost >= Minimum + A3_cityOfWarModel.getInstance().max_cost) { mineCost = Minimum + A3_cityOfWarModel.getInstance().max_cost; } inputCost.text = mineCost.ToString(); }; new BaseButton(inputTip.transform.FindChild("btn_reduce")).onClick = (GameObject go) => { mineCost = mineCost - A3_cityOfWarModel.getInstance().one_change_cost; if (mineCost <= Minimum + A3_cityOfWarModel.getInstance().min_cost) { if (mineCost <= 0) { mineCost = 0; flytxt.instance.fly(ContMgr.getCont("A3_cityOfWar_nullMoney")); } else { mineCost = Minimum + A3_cityOfWarModel.getInstance().min_cost; } } inputCost.text = mineCost.ToString(); }; new BaseButton(inputTip.transform.FindChild("toup")).onClick = (GameObject go) => { A3_cityOfWarProxy.getInstance().sendApply((uint)mineCost); inputTip.SetActive(false); }; new BaseButton(inputTip.transform.FindChild("close")).onClick = (GameObject go) => { inputTip.SetActive(false); }; new BaseButton(this.transform.FindChild("viewbg/applyview/Refresh")).onClick = (GameObject go) => { A3_cityOfWarProxy.getInstance().sendProxy(1); }; new BaseButton(this.transform.FindChild("help")).onClick = (GameObject go) => { helpCon.SetActive(true); }; new BaseButton(this.transform.FindChild("helpCon/close")).onClick = (GameObject go) => { helpCon.SetActive(false); }; new BaseButton(this.transform.FindChild("viewbg/Prepareview/apply_btn")).onClick = (GameObject go) => { if (A3_LegionModel.getInstance().myLegion.clanc < 3) { flytxt.flyUseContId("clan_8"); return; } if (curSelectId != 0) { A3_cityOfWarProxy.getInstance().sendPrepare((uint)curSelectId); } }; inText(); }
void refreshTime_Stage() { TimeType a = A3_cityOfWarModel.getInstance().checkTime(); SetWar_stage(a); }
void onInfo(Variant data) { int res = data["res"]; debug.Log("City" + data.dump()); if (res < 0) { Globle.err_output(res); return; } switch (res) { case 1: debug.Log("GGGG" + A3_LegionModel.getInstance().myLegion.id); //请求攻城战数据 A3_cityOfWarModel.getInstance().last_type = data["last_type"]; A3_cityOfWarModel.getInstance().llid = data["llid"]; A3_cityOfWarModel.getInstance().def_clanid = data["def_clanid"]; A3_cityOfWarModel.getInstance().start_tm = data["start_tm"]; A3_cityOfWarModel.getInstance().clan_pcid = data["clan_pcid"]; A3_cityOfWarModel.getInstance().clan_lvl = data["clan_lvl"]; A3_cityOfWarModel.getInstance().clan_name = data["clan_name"]; A3_cityOfWarModel.getInstance().Castellan_name = data["name"]; A3_cityOfWarModel.getInstance().Castellan_zhuan = data["zhuan"]; A3_cityOfWarModel.getInstance().Castellan_lvl = data["lvl"]; A3_cityOfWarModel.getInstance().Castellan_combpt = data["combpt"]; A3_cityOfWarModel.getInstance().Castellan_carr = data["carr"]; if (data.ContainsKey("def_info")) { A3_cityOfWarModel.getInstance().deflist.Clear(); List <Variant> l = data["def_info"]._arr; foreach (var v in l) { defInfo temp = new defInfo(); temp._type = v["type"]; temp._lvl = v["level"]; A3_cityOfWarModel.getInstance().deflist[v["type"]] = temp; } } if (data.ContainsKey("apply_list")) { A3_cityOfWarModel.getInstance().apply_list.Clear(); List <Variant> l = data["apply_list"]._arr; List <Apply_Info> ApplyList = new List <Apply_Info>(); foreach (var v in l) { Apply_Info temp = new Apply_Info(); temp.clan_id = v["clan_id"]; temp.clan_name = v["clan_name"]; temp.apply_num = v["apply_num"]; temp.apply_tm = v["apply_tm"]; temp.clan_lvl = v["clan_lvl"]; ApplyList.Add(temp); } ApplyList.Sort(); A3_cityOfWarModel.getInstance().apply_list = ApplyList; } dispatchEvent(GameEvent.Create(REFRESHINFO, this, data)); // A3_cityOfWarModel.getInstance().gg(); break; case 2: //进入攻城战 break; case 3: //提升防御 if (A3_cityOfWarModel.getInstance().deflist.ContainsKey(data["type"])) { A3_cityOfWarModel.getInstance().deflist[data["type"]]._lvl = data["level"]; } else { defInfo temp = new defInfo(); temp._type = data["type"]; temp._lvl = data["level"]; A3_cityOfWarModel.getInstance().deflist[data["type"]] = temp; } dispatchEvent(GameEvent.Create(REFRESHPREPARE, this, data)); break; case 4: //投标出价 if (data.ContainsKey("apply_list")) { A3_cityOfWarModel.getInstance().apply_list.Clear(); List <Variant> l = data["apply_list"]._arr; List <Apply_Info> ApplyList = new List <Apply_Info>(); foreach (var v in l) { Apply_Info temp = new Apply_Info(); temp.clan_id = v["clan_id"]; temp.clan_name = v["clan_name"]; temp.apply_num = v["apply_num"]; temp.apply_tm = v["apply_tm"]; temp.clan_lvl = v["clan_lvl"]; ApplyList.Add(temp); } ApplyList.Sort(); A3_cityOfWarModel.getInstance().apply_list = ApplyList; dispatchEvent(GameEvent.Create(REFRESHAPPLY, this, data)); } break; case 5: //攻城战统计 break; case 6: // 地图成员信息 break; case 8: list_position.Clear(); List <Variant> ll = data["data"]._arr; foreach (var v in ll) { PlayerPos_cityWar temp = new PlayerPos_cityWar(); temp.lvlsideid = v["lvlsideid"]; temp.iid = v["iid"]; temp.x = (uint)((v["x"]) / GameConstant.PIXEL_TRANS_UNITYPOS); temp.y = (uint)((v["y"]) / GameConstant.PIXEL_TRANS_UNITYPOS); list_position[v["iid"]] = temp; } break; case 9: if (data["lvlsideid"] == PlayerModel.getInstance().lvlsideid) { signalInfo info = new signalInfo(); info.signalType = data["type"]; info.x = (int)(data["x"]); info.y = (int)(data["y"]); info.cd = 5; A3_cityOfWarModel.getInstance().signalList.Add(info); a3_insideui_fb.instance.changesignal(info.signalType); if (a3_liteMiniBaseMap2.instance) { a3_liteMiniBaseMap2.instance.SetSignal(); } } break; case 20: //怪物血量和人数 A3_cityOfWarModel.getInstance().atk_num = data["atk_num"]; A3_cityOfWarModel.getInstance().def_num = data["def_num"]; if (data["door_open"] == 1) { A3_cityOfWarModel.getInstance().door_open = true; } else { A3_cityOfWarModel.getInstance().door_open = false; } if (data.ContainsKey("mon_hpper")) { List <Variant> l = data["mon_hpper"]._arr; A3_cityOfWarModel.getInstance().SetMonInfo(l); } dispatchEvent(GameEvent.Create(REFRESHFBINFO, this, data)); break; case 21: //击杀通知 break; case 22: //助攻通知 break; } }