Beispiel #1
0
        private void RefreshMailContent(int id)//更新邮件的信息
        {
            mailtitle.gameObject.SetActive(false);
            mailcontent.gameObject.SetActive(false);
            fajianren2.gameObject.SetActive(false);
            time2.gameObject.SetActive(false);
            hint.gameObject.SetActive(false);
            del1.gameObject.SetActive(false);
            get.gameObject.SetActive(false);
            del2.gameObject.SetActive(false);
            tx_infos.gameObject.SetActive(false);
            for (int i = 0; i < itmGrid.transform.childCount; i++)
            {
                Destroy(itmGrid.transform.GetChild(i).gameObject);
            }
            for (int i = 0; i < coinGrid.transform.childCount; i++)//创造网格
            {
                Destroy(coinGrid.transform.GetChild(i).gameObject);
            }

            if (A3_MailModel.getInstance().mail_simple.Count == 0)
            {
                hint.gameObject.SetActive(true);
                hint.text = ContMgr.getCont("mail_hint_1");
                return;
            }

            if (id == -1 || !A3_MailModel.getInstance().mail_details.ContainsKey((uint)id))
            {//未选中邮件或邮件数据不存在
                hint.gameObject.SetActive(true);
                hint.text = ContMgr.getCont("mail_hint_2");
            }
            else
            {
                A3_MailDetail mdetail = A3_MailModel.getInstance().mail_details[(uint)id];

                mailtitle.gameObject.SetActive(true);
                mailtitle.text = mdetail.ms.title;

                fajianren2.gameObject.SetActive(true);
                fajianren2.text = mdetail.ms.tp;

                time2.gameObject.SetActive(true);
                string ts = MuGame.Globle.getStrTime((int)mdetail.ms.tm);
                time2.text = ts;

                mailcontent.gameObject.SetActive(true);
                mailcontent.text = mdetail.msg;

                if (!mdetail.ms.has_itm)
                {//!--没有附件
                    del2.gameObject.SetActive(true);
                }
                else
                {//!--有附件
                    GameObject icon;
                    if (mdetail.money != 0)
                    {
                        CreateCoinIcon("coin1", mdetail.money);
                    }
                    if (mdetail.yb != 0)
                    {
                        CreateCoinIcon("coin2", mdetail.yb);
                    }
                    if (mdetail.bndyb != 0)
                    {
                        CreateCoinIcon("coin3", mdetail.bndyb);
                    }
                    for (int i = 0; i < mdetail.itms.Count; i++)
                    {
                        a3_BagItemData data = mdetail.itms[i];
                        icon = IconImageMgr.getInstance().createA3ItemIcon(data, true, data.num);
                        icon.transform.SetParent(itmGrid.transform, false);
                        if (data.num <= 1)
                        {
                            icon.transform.FindChild("num").gameObject.SetActive(false);
                        }

                        BaseButton bs_bt = new BaseButton(icon.transform);
                        bs_bt.onClick = delegate(GameObject go) { this.onMailItemClick(data); };
                    }

                    if (mdetail.ms.got_itm)
                    {//!--已领取
                        del2.gameObject.SetActive(true);
                        tx_infos.gameObject.SetActive(true);
                        tx_infos.text = ContMgr.getCont("mail_hint_0");
                        for (int i = 0; i < itmGrid.transform.childCount; i++)
                        {
                            Destroy(itmGrid.transform.GetChild(i).gameObject);
                        }
                        for (int i = 0; i < coinGrid.transform.childCount; i++)//创造网格
                        {
                            Destroy(coinGrid.transform.GetChild(i).gameObject);
                        }
                    }
                    else
                    {//!--未领取
                        del1.gameObject.SetActive(true);
                        get.gameObject.SetActive(true);
                    }
                }
            }
        }
        void onTab(string tran, int select_tujian = -1)
        {
            if (model.GetSummons().Count <= 0 && tran != "tujian")
            {
                flytxt.instance.fly(ContMgr.getCont("a3_summon_unllSummon"));
                return;
            }

            if (!A3_SummonModel.getInstance().Checklvl(GetType(tran), CurSummonID) && tran != "tujian" && A3_SummonModel.getInstance().GetSummons().ContainsKey(CurSummonID))
            {
                flytxt.instance.fly("召唤兽等级不足" + A3_SummonModel.getInstance().limitList[GetType(tran)].lvl + "级");
                return;
            }
            switch (tran)
            {
            case "shuxing": CurTranType = 1; break;

            case "xilian": CurTranType = 2; break;

            case "shouhun": CurTranType = 3; break;

            case "ronghe": CurTranType = 4; break;

            case "tunshi": CurTranType = 5; break;

            case "lianxie": CurTranType = 6; break;

            case "tujian": CurTranType = 0; break;
            }

            for (int i = 0; i < Btns.childCount; i++)
            {
                Btns.GetChild(i).GetComponent <Button>().interactable = true;
            }
            Btns.FindChild(tran).GetComponent <Button>().interactable = false;
            if (Curtran != null && Curtran.TransName == tran)
            {
                return;
            }
            foreach (BaseSummon am in _Trans.Values)
            {
                if (am != null)
                {
                    am.tranObj.SetActive(false);
                }
            }
            if (!_Trans.Keys.Contains(tran) || _Trans[tran] == null)
            {
                GameObject prefab = null;
                GameObject panel  = null;
                switch (tran)
                {
                case "shuxing":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_shuxing");// InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_shuxing");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_shuxing(panel.transform, tran);
                    break;

                case "xilian":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_xilian");// ; InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_xilian");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_xilian(panel.transform, tran);
                    break;

                case "shouhun":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_shouhun");// InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_shouhun");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_shouhun(panel.transform, tran);
                    break;

                case "ronghe":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_ronghe"); //InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_ronghe");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_ronghe(panel.transform, tran);
                    break;

                case "tunshi":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_tunshi"); //InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_tunshi");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_tunshi(panel.transform, tran);
                    break;

                case "lianxie":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_lianxie");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_lianxie(panel.transform, tran);
                    break;

                case "tujian":

                    prefab       = GAMEAPI.ABLayer_LoadNow_GameObject("uilayer_a3_summon_tujian"); //InterfaceMgr.doGetAssert(GAMEAPI.ABLayer_LoadNow_GameObject, "a3_summon_tujian");
                    panel        = GameObject.Instantiate(prefab) as GameObject;
                    _Trans[tran] = new a3_summon_tujian(panel.transform, tran);
                    break;
                }
                panel.transform.SetParent(contents, false);
            }
            Curtran?.onClose();
            Curtran = _Trans[tran];
            Curtran.refreCurSummonID();

            refresh_summon_list(-1, false, GetType(tran));
            if (tran == "tujian" && select_tujian > 0)
            {//图鉴设置初始选定召唤兽
                Curtran.select_tujian = select_tujian;
            }
            Curtran?.onShowed();
            Curtran?.gameObject.SetActive(true);
            if (Curtran.TransName != "tujian")
            {
                summonlist.gameObject.SetActive(true);
            }
            else
            {
                summonlist.gameObject.SetActive(false);
            }
        }
        void GetInfo(GameEvent e)
        {
            Variant data = e.data;

            name     = data["name"];
            carr     = data["carr"];
            lvl      = data["lvl"];
            zhuan    = data["zhuan"];
            combpt   = data["combpt"];
            wing_lvl = data["wing_lvl"];
            if (data.ContainsKey("wing_stage"))
            {
                wing_stage = data["wing_stage"];
            }
            if (data.ContainsKey("show_wing"))
            {
                show_wing = data["show_wing"];
            }
            if (data.ContainsKey("pet_type"))
            {
                pet_type = data["pet_type"];
            }
            if (data.ContainsKey("clan_name"))
            {
                clan_name = data["clan_name"];
            }
            if (data.ContainsKey("summon_combpt"))
            {
                summon_combpt = data["summon_combpt"];
            }
            if (data.ContainsKey("grade"))
            {
                jjclvl = data["grade"];
            }
            if (data.ContainsKey("score"))
            {
                jjcfec = data["score"];
            }
            if (data.ContainsKey("dress_list"))
            {
                if (data["dress_list"] != null && data["dress_list"].Count > 0)
                {
                    fashionsshows[0] = data["dress_list"][0]._int;
                    fashionsshows[1] = data["dress_list"][1]._int;
                }
                else
                {
                    fashionsshows[0] = fashionsshows[1] = 0;
                }
            }
            else
            {
                clan_name = "";
            }
            string file = "";

            switch (carr)
            {
            case 1:
                break;

            case 2:
                file = "icon_job_icon_h2";
                break;

            case 3:
                file = "icon_job_icon_h3";
                break;

            case 4:
                file = "icon_job_icon_h4";
                break;

            case 5:
                file = "icon_job_icon_h5";
                break;
            }
            Image head = transform.FindChild("playerInfo/panel_attr/hero_ig/ig").GetComponent <Image>();

            head.sprite = GAMEAPI.ABUI_LoadSprite(file);
            transform.FindChild("playerInfo/panel_attr/name").GetComponent <Text>().text = name;
            transform.FindChild("playerInfo/panel_attr/lv").GetComponent <Text>().text   = "Lv" + lvl + "(" + zhuan + ContMgr.getCont("zhuan") + ")";
            getTransformByPath("fighting/value").GetComponent <Text>().text = combpt.ToString();
            if (jjclvl > 0)
            {
                SXML   itXml = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + jjclvl);
                string jjc   = itXml.getString("name");
                transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/1/value").GetComponent <Text>().text = jjc;
            }
            else
            {
                transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/1/value").GetComponent <Text>().text = ContMgr.getCont("a3_targetinfo_nodw");
            }
            if (jjclvl < 10)
            {
                transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/1/icon").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_00" + jjclvl);
            }
            else
            {
                transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/1/icon").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_0" + jjclvl);
            }
            transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/2/value").GetComponent <Text>().text = summon_combpt.ToString();
            transform.FindChild("playerInfo/panel_attr/attr_scroll/scroll/contain/3/value").GetComponent <Text>().text = wing_stage + ContMgr.getCont("a3_auction_jie") + wing_lvl + ContMgr.getCont("ji");

            if (data.ContainsKey("min_attack"))
            {
                transform.FindChild("playerInfo/panel_attr/att/atk/value").GetComponent <Text>().text     = data["min_attack"] + "-" + data["max_attack"];
                transform.FindChild("playerInfo/panel_attr/att/hp/value").GetComponent <Text>().text      = data["max_hp"];
                transform.FindChild("playerInfo/panel_attr/att/phydef/value").GetComponent <Text>().text  = data["physics_def"];
                transform.FindChild("playerInfo/panel_attr/att/manadef/value").GetComponent <Text>().text = data["magic_def"];
            }

            if (clan_name == "")
            {
                transform.FindChild("playerInfo/panel_attr/team").gameObject.SetActive(false);
                transform.FindChild("playerInfo/panel_attr/no_team").gameObject.SetActive(true);
            }
            else
            {
                transform.FindChild("playerInfo/panel_attr/team").gameObject.SetActive(true);
                transform.FindChild("playerInfo/panel_attr/team/team_name").GetComponent <Text>().text = clan_name;
                transform.FindChild("playerInfo/panel_attr/no_team").gameObject.SetActive(false);
            }

            Variant equips = data["equipments"];

            Equips.Clear();
            active_eqp.Clear();
            foreach (var v in equips._arr)
            {
                a3_BagItemData item = new a3_BagItemData();
                item.confdata.equip_type = v["part_id"];
                Variant info = v["eqpinfo"];
                item.id       = info["id"];
                item.tpid     = info["tpid"];
                item.confdata = a3_BagModel.getInstance().getItemDataById(item.tpid);
                a3_EquipModel.getInstance().equipData_read(item, info);
                Equips[item.confdata.equip_type] = item;
            }
            foreach (a3_BagItemData item in Equips.Values)
            {
                if (isactive_eqp(item))
                {
                    active_eqp[item.confdata.equip_type] = item;
                }
            }
            //Dictionary < int, a3_BagItemData > newEquip = new Dictionary<int, a3_BagItemData>();
            //foreach (int itemid in Equips.Keys)
            //{
            //    a3_BagItemData one = Equips[itemid];
            //    one.equipdata.combpt = a3_BagModel.getInstance().Getcombpt(a3_BagModel .getInstance ().Getequip_att(Equips[itemid]));
            //    newEquip[itemid] = one;
            //}

            //Equips.Clear();
            //Equips = newEquip;

            initEquipIcon();
            createAvatar();
            setAni();
            SetAni_Color();
        }
Beispiel #4
0
        void inText()
        {
            this.transform.FindChild("yiwufb_defet/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_1");            //不要气馁,提升战斗力再来挑战
            this.transform.FindChild("btn_close/Text").GetComponent <Text>().text    = ContMgr.getCont("uilayer_a3_fb_finish_2");            //确认
            this.transform.FindChild("Text_tip").GetComponent <Text>().text          = ContMgr.getCont("uilayer_a3_fb_finish_3");            //单人副本掉落的物品会被自动拾取

            this.transform.FindChild("win/fail/TextOne").GetComponent <Text>().text             = ContMgr.getCont("uilayer_a3_fb_finish_4"); //失敗了也不要氣餒,提升戰鬥力后再來挑戰
            this.transform.FindChild("win/fail/icon/dz/TextSix").GetComponent <Text>().text     = ContMgr.getCont("uilayer_a3_fb_finish_8"); //失敗了也不要氣餒,提升戰鬥力后再來挑戰
            this.transform.FindChild("win/fail/icon/zhs/TextFive").GetComponent <Text>().text   = ContMgr.getCont("uilayer_a3_fb_finish_7"); //失敗了也不要氣餒,提升戰鬥力后再來挑戰
            this.transform.FindChild("win/fail/icon/skill/TextFour").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_6"); //失敗了也不要氣餒,提升戰鬥力后再來挑戰
            this.transform.FindChild("win/fail/icon/bag/TextTwo").GetComponent <Text>().text    = ContMgr.getCont("uilayer_a3_fb_finish_5"); //失敗了也不要氣餒,提升戰鬥力后再來挑戰
        }
        public void onLoadShop(Variant data)
        {
            debug.Log("商城信息:" + data.dump());
            int res = data["res"];

            if (res == 0)
            {
                if (data["confs"].Length > 0)
                {
                    foreach (Variant v in data["confs"]._arr)
                    {
                        Shop_a3Model.getInstance().bundinggem(v["id"], v["item_num"]);
                    }
                }
                if (shop_a3.instance && shop_a3.instance.isbangding)
                {
                    shop_a3.instance.tab3();
                }
            }
            else if (res == 1)
            {
                debug.Log("收到的a3显示抢购刷新信息:" + data.dump());

                dispatchEvent(GameEvent.Create(LIMITED, this, data));
            }
            else if (res == 2)
            {
                debug.Log("收到的3购买信息:" + data.dump());
                if (a3_npc_shop.instance != null && a3_npc_shop.instance.isnpcshop)
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_npcshop1"));
                }
                else
                {
                    if (data["left_num"] != null)
                    {
                        Shop_a3Model.getInstance().bundinggem(data["id"], data["item_num"], data["left_num"]);
                    }
                    else
                    {
                        Shop_a3Model.getInstance().bundinggem(data["id"], data["item_num"]);
                    }

                    if (data.ContainsKey("donate"))
                    {
                        dispatchEvent(GameEvent.Create(DONATECHANGE, this, data));
                    }
                    if (shop_a3._instance != null)
                    {
                        shop_a3._instance.Refresh(data["id"], data["item_num"]);
                    }
                    InterfaceMgr.getInstance().close(InterfaceMgr.A3_DYETIP);
                }
            }
            else if (res == 3)
            {
                debug.Log("收到的a3限时特卖购买信息:" + data.dump());
                shop_a3._instance.Refresh_limited(data["id"], data["shop_id"], data["left_num"]);
            }
            else if (res == 4)
            {
                debug.Log("收到的a3新增或变更限时特卖购买活动:" + data.dump());
                dispatchEvent(GameEvent.Create(CHANGELIMITED, this, data));
            }
            else if (res == 5)
            {
                debug.Log("收到的a3限时特卖更改活动信息:" + data.dump());
                dispatchEvent(GameEvent.Create(DELETELIMITED, this, data));
            }
            else if (res < 0)
            {
                Globle.err_output(data["res"]);
                return;
            }
        }
Beispiel #6
0
        void setGift()
        {
            SXML Xml = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + a3_sportsModel.getInstance().lastgrage);

            this.transform.FindChild("Gift/last_rank").GetComponent <Text>().text = Xml.getString("name");
            transform.FindChild("Gift/rew").gameObject.SetActive(false);
            transform.FindChild("Gift/geted").gameObject.SetActive(false);
            transform.FindChild("Gift/nullrew").gameObject.SetActive(false);
            this.transform.FindChild("reward").gameObject.SetActive(true);
            if (a3_sportsModel.getInstance().lastgrage > 1)
            {
                if (a3_sportsModel.getInstance().Canget <= 0)
                {
                    //有奖励
                    this.transform.FindChild("reward/tet").GetComponent <Text>().text       = ContMgr.getCont("lingqu");
                    this.transform.FindChild("reward").GetComponent <Button>().interactable = true;
                    transform.FindChild("Gift/rew").gameObject.SetActive(true);
                    uint boxid    = (uint)Xml.GetNode("box").getInt("id");
                    var  xml      = XMLMgr.instance.GetSXML("item.item", "id==" + boxid);
                    int  zhuanshi = Xml.GetNode("gem").getInt("num");
                    int  mingwang = Xml.GetNode("rep").getInt("num");
                    transform.FindChild("Gift/rew/gem/count").GetComponent <Text>().text = zhuanshi.ToString();
                    transform.FindChild("Gift/rew/rep/count").GetComponent <Text>().text = mingwang.ToString();
                    Image icon = transform.FindChild("Gift/rew/box").GetComponent <Image>();
                    icon.sprite = GAMEAPI.ABUI_LoadSprite("icon_item_" + xml.getString("icon_file"));
                    new BaseButton(icon.transform).onClick = (GameObject go) =>
                    {
                        showtip(boxid);
                    };
                }
                else
                {
                    this.transform.FindChild("reward").GetComponent <Button>().interactable = false;

                    this.transform.FindChild("reward/tet").GetComponent <Text>().text = ContMgr.getCont("yilingqu");
                    transform.FindChild("Gift/geted").gameObject.SetActive(true);
                }
            }
            else
            {
                //无奖励
                this.transform.FindChild("reward").gameObject.SetActive(false);
                transform.FindChild("Gift/nullrew").gameObject.SetActive(true);
            }
            //Image icon = clon.transform.FindChild("icon").GetComponent<Image>();
        }
        public void init(Transform trans)
        {
            _instance = this;
            inText();
            itemMemberObjList = new List <ItemMemberObj>();
            txtTeambuff       = trans.FindChild("right/bottom/teambuff").GetComponent <Text>();
            Transform objects = trans.FindChild("right/main/body/contains");

            team_object        = transform.FindChild("right/bottom/team_object/Dropdown").gameObject;
            team_object_change = team_object.GetComponent <Dropdown>();
            team_object_change.onValueChanged.AddListener(team_object_dropdownClick);


            team_object_change.captionText.text = ContMgr.getCont("a3_teamPanel_16");
            for (int i = 0; i < team_object_change.options.Count; i++)
            {
                team_object_change.options[i].text = ContMgr.getCont("a3_teamPanel_" + (i + 16));
            }

            for (int i = 0; i < objects.childCount; i++)
            {
                Transform     child         = objects.GetChild(i);
                ItemMemberObj itemMemberObj = new ItemMemberObj(child);
                itemMemberObjList.Add(itemMemberObj);
            }
            togInvite = trans.FindChild("right/bottom/togInvite").GetComponent <Toggle>();
            /*暂时先屏蔽掉*/ //togJoin = trans.FindChild("right/bottom/togJoin").GetComponent<Toggle>();
            togInvite.onValueChanged.AddListener(onTogAgreenAddOtherClick);
            //togJoin.onValueChanged.AddListener(onTogAgreeOtherApplyClick);
            materialGrey  = U3DAPI.U3DResLoad <Material>("uifx/uiGray");
            carrSpriteDic = new Dictionary <uint, Sprite>();

            for (int i = 0; i < 3; i++)
            {
                if (i == 0)
                {
                    carrSpriteDic.Add(2, GAMEAPI.ABUI_LoadSprite("icon_team_warrior_team"));
                }
                if (i == 1)
                {
                    carrSpriteDic.Add(3, GAMEAPI.ABUI_LoadSprite("icon_team_mage_team"));
                }
                if (i == 2)
                {
                    carrSpriteDic.Add(5, GAMEAPI.ABUI_LoadSprite("icon_team_assassin_team"));
                }
            }
            BaseButton btnQuitTeam = new BaseButton(trans.FindChild("right/bottom/btnQuitTeam"));

            btnQuitTeam.onClick = onBtnQuitTeamClick;
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CREATETEAM, onCreateTeam);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_AFFIRMINVITE, onAffirminvite);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_NEWMEMBERJOIN, onNewMemberJoin);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_KICKOUT, onNoticeHaveMemberLeave);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CHANGETEAMINFO, onChangeTeamInfo);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_NOTICEHAVEMEMBERLEAVE, onNoticeHaveMemberLeave);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_LEAVETEAM, onLeaveTeam);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_NOTICEONLINESTATECHANGE, onNoticeOnlineStateChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CHANGECAPTAIN, onChangeCaptain);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_TEAMOBJECT_CHANGE, onChangeTeamObject);
            if (TeamProxy.getInstance().MyTeamData != null)
            {
                team_object_change.value = change_v((int)TeamProxy.getInstance().MyTeamData.ltpid, false);
            }

            new BaseButton(transform.Find("right/main/body/btn_call")).onClick = OnClickMsg;
        }
Beispiel #8
0
        // 其他刷新
        public void Refresh_other(int award_id, int nowday)
        {
            //nowday;当前选中天数 thisday:当天
            Refresh_point();
            int i;

            if (dic_three_info.ContainsKey(award_id))
            {
                i = dic_three_info[award_id];
            }
            else
            {
                return;
            }

            BaseButton btn      = new BaseButton(lst_obj[i].transform.FindChild("Button").transform);
            Text       btn_txt  = lst_obj[i].transform.FindChild("Button/Text").GetComponent <Text>();
            GameObject over_obj = lst_obj[i].transform.FindChild("over").gameObject;
            GameObject old_obj  = lst_obj[i].transform.FindChild("old").gameObject;
            GameObject new_obj  = lst_obj[i].transform.FindChild("new").gameObject;
            Text       name     = lst_obj[i].transform.FindChild("name").GetComponent <Text>();

            int thisday = A3_SevendayModel.getInstance().thisday;
            Dictionary <int, sevendayData> dic = A3_SevendayModel.getInstance().dic_data;

            string txt = dic[nowday].task_award[award_id].task_des;

            btn_txt.text = ContMgr.getCont("a3_sevenday_get1");

            btn.gameObject.SetActive(false);
            btn.interactable = false;
            old_obj.SetActive(false);
            new_obj.SetActive(false);
            over_obj.SetActive(false);

            //des
            switch (dic[nowday].task_award[award_id].task_type)
            {
            //1:消费
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 9:
            case 10:
            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:

                if (dic[nowday].task_award[award_id].task_have >= int.Parse(dic[nowday].task_award[award_id].task_need))
                {
                    name.text = txt + ContMgr.getCont("canover");
                }
                else
                {
                    name.text = txt + "(" + dic[nowday].task_award[award_id].task_have + "/" + dic[nowday].task_award[award_id].task_need + ")";
                }
                break;

            //name.text = txt + "(" + dic[nowday].task_award[award_id].task_have + "/" + dic[nowday].task_award[award_id].task_need + ")";
            //break;
            //8:等级奖励
            case 8:
                name.text = txt /*+ "(" + "当前:" + PlayerModel.getInstance().up_lvl + "转" + PlayerModel.getInstance().lvl + "级" + ")";*/;
                break;
            }
            //可领状态
            switch (dic[nowday].task_award[award_id].task_type)
            {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 9:
            case 10:
            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:
                //if (nowday<thisday)
                //{
                //    old_obj.SetActive(true);
                //}
                if (nowday == thisday || nowday < thisday)
                {
                    if (dic[nowday].task_award[award_id].state == 0)
                    {
                        btn.gameObject.SetActive(true);
                        btn.interactable = false;
                    }
                    else if (dic[nowday].task_award[award_id].state == 1)
                    {
                        btn.gameObject.SetActive(true);
                        btn.interactable = true;
                        lst_obj[i].transform.SetAsFirstSibling();
                    }
                    else
                    {
                        over_obj.SetActive(true);
                        lst_obj[i].transform.SetAsLastSibling();
                    }
                }
                else
                {
                    new_obj.SetActive(true);
                }

                break;

            case 8:                /*等级是可以领的其他不行*/
                if (nowday <= thisday)
                {
                    if (dic[nowday].task_award[award_id].state == 0)
                    {
                        btn.gameObject.SetActive(true);
                        btn.interactable = false;
                    }
                    else if (dic[nowday].task_award[award_id].state == 1)
                    {
                        btn.gameObject.SetActive(true);
                        btn.interactable = true;
                        lst_obj[i].transform.SetAsFirstSibling();
                    }
                    else
                    {
                        over_obj.SetActive(true);
                        lst_obj[i].transform.SetAsLastSibling();
                    }
                }
                else
                {
                    new_obj.SetActive(true);
                }

                break;
            }
        }
Beispiel #9
0
 //界面打开时过期
 public void Refresh_time()
 {
     txt_overtime.text = ContMgr.getCont("a3_sevenday_old");
 }
        void creatrveBuild()
        {
            for (int j = 0; j < build_parent.childCount; j++)
            {
                SXML x = XMLMgr.instance.GetSXML("clan.clan_donate", "id==" + (j + 1));
                build[j + 1] = build_parent.GetChild(j).gameObject;
                build_parent.GetChild(j).transform.FindChild("zijing").GetComponent <Text>().text   = ContMgr.getCont("a3_legion_build5") + x.getString("clan_money");
                build_parent.GetChild(j).transform.FindChild("gongxian").GetComponent <Text>().text = ContMgr.getCont("a3_legion_build6") + x.getString("donate");
                string costType_file = string.Empty;
                switch (x.getInt("cost_type"))
                {
                case 2: costType_file = "icon_coin_coin1"; break;

                case 3: costType_file = "icon_coin_coin3"; break;

                case 4: costType_file = "icon_coin_coin2"; break;
                }
                build_parent.GetChild(j).transform.FindChild("Button/Image").GetComponent <Image>().sprite  = GAMEAPI.ABUI_LoadSprite(costType_file);
                build_parent.GetChild(j).transform.FindChild("Button/Image/num").GetComponent <Text>().text = x.getString("cost_num");
                new BaseButton(build_parent.GetChild(j).transform.FindChild("Button")).onClick = (GameObject go) =>
                {
                    buildBtnOnClick(int.Parse(go.transform.parent.name));
                };
            }
        }
Beispiel #11
0
        // 0:登陆,1:半价刷新
        public void RefreshData_lgAndbuy(int i, int nowday)
        {
            //i =0登陆=1半价
            Refresh_point();
            BaseButton btn      = new BaseButton(lst_obj[i].transform.FindChild("Button").transform);
            Text       btn_txt  = lst_obj[i].transform.FindChild("Button/Text").GetComponent <Text>();
            GameObject over_obj = lst_obj[i].transform.FindChild("over").gameObject;
            GameObject old_obj  = lst_obj[i].transform.FindChild("old").gameObject;
            GameObject new_obj  = lst_obj[i].transform.FindChild("new").gameObject;

            int thisday = A3_SevendayModel.getInstance().thisday;
            Dictionary <int, sevendayData> dic = A3_SevendayModel.getInstance().dic_data;

            btn_txt.text = i == 0 ? ContMgr.getCont("off_line_lq") : ContMgr.getCont("a3_sevenday_buy");
            if (i == 0)
            {
                btn.interactable = false;
                btn.gameObject.SetActive(false);
                old_obj.SetActive(false);
                new_obj.SetActive(false);
                over_obj.SetActive(false);
                if (nowday <= thisday)
                {
                    switch (dic[nowday].loginaed.state)
                    {
                    case 0:    /*可领没领*/
                        btn.interactable = true;
                        btn.gameObject.SetActive(true);
                        lst_obj[i].transform.SetAsFirstSibling();
                        break;

                    case 1:    /*领过*/
                        over_obj.SetActive(true);
                        lst_obj[i].transform.SetAsLastSibling();
                        break;

                    case 2:    /*不能领*/
                        btn.interactable = false;
                        btn.gameObject.SetActive(true);
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    new_obj.SetActive(true);
                }
            }
            else
            {
                btn.gameObject.SetActive(false);
                old_obj.SetActive(false);
                new_obj.SetActive(false);
                over_obj.SetActive(false);
                if (thisday == nowday)
                {
                    if (dic[nowday].halfbuy.isReceive)
                    {
                        over_obj.SetActive(true);
                        lst_obj[i].transform.SetAsLastSibling();
                    }
                    else
                    {
                        btn.gameObject.SetActive(true);
                    }
                }
                else if (nowday < thisday)
                {
                    old_obj.SetActive(true);
                }
                else if (nowday > thisday)
                {
                    new_obj.SetActive(true);
                }

                //btn_txt.text = i == 0 ? ContMgr.getCont("off_line_lq") : ContMgr.getCont("a3_sevenday_buy");
            }
        }
        public override void init()
        {
            _instance = this;
            ditu      = getComponentByPath <Text>("shijieditu");
            // PlayerModel.SendPosition();
            m_goWorldmap = getGameObjectByPath("worldmap");
            //vecBegin = m_goWorldmap.transform.position;
            //vecEnd = vecBegin;
            //vecEnd.y = 600f;
            //m_goWorldmap.transform.position = vecEnd;
            m_goMapcon = getGameObjectByPath("mapcon");

            btclose         = new BaseButton(getTransformByPath("btclose"));
            btclose.onClick = onClose;

            btGoCity         = new BaseButton(getTransformByPath("tabrole/gotomain"));
            btGoCity.onClick = onGotoCity;

            GameObject temp = getGameObjectByPath("tabrole/temp");

            temp.SetActive(false);
            tempH       = temp.GetComponent <RectTransform>().sizeDelta.y;
            npcList     = new ItemList(getTransformByPath("tabrole/npcmain"), 0, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            monsterList = new ItemList(getTransformByPath("tabrole/monstermain"), 1, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            wayList     = new ItemList(getTransformByPath("tabrole/waymain"), 2, temp, onNpcListClick, onMonsterListClick, onWayListClick);
            goTabrole   = getGameObjectByPath("tabrole");

            tick = new TickItem(onUpdate);

            tab = new TabControl();
            tab.onClickHanle = ontab;

            tab.create(getGameObjectByPath("tab"), gameObject, 0, 0);



            goP   = getGameObjectByPath("mapcon/p");
            goP1  = getGameObjectByPath("mapcon/icon");
            goP22 = transform.FindChild("worldmap/icon").gameObject;
            //BaseButton btnChangeLine = new BaseButton(getTransformByPath("tabrole/btnChangeLine"));
            //btnChangeLine.onClick = onBtnChangeLineClick;


            initWorldMap();



            if (m_goMapcon.activeInHierarchy && TeamProxy.getInstance().MyTeamData != null)
            {
                teampos();
            }
            //resfreshTeamPos();
            mapRotation = Quaternion.Euler(0f, 0f, 0f);


            getComponentByPath <Text>("tab/world/Text").text = ContMgr.getCont("worldmap_0");
            getComponentByPath <Text>("tab/map/Text").text   = ContMgr.getCont("worldmap_1");
            getComponentByPath <Text>("tabrole/monstermain/way/Text").text     = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/monstermain/monster/Text").text = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/npcmain/way/Text").text         = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/npcmain/monster/Text").text     = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/waymain/way/Text").text         = ContMgr.getCont("worldmap_2");
            getComponentByPath <Text>("tabrole/waymain/monster/Text").text     = ContMgr.getCont("worldmap_3");
            getComponentByPath <Text>("tabrole/gotomain/Text").text            = ContMgr.getCont("worldmap_4");
            getComponentByPath <Text>("tabrole/btnChangeLine/Text").text       = ContMgr.getCont("worldmap_5");
            getComponentByPath <Text>("worldmap/title/Text").text = ContMgr.getCont("worldmap_6");
            getComponentByPath <Text>("worldmap/name").text       = ContMgr.getCont("worldmap_7");
            getComponentByPath <Text>("shijieditu").text          = ContMgr.getCont("worldmap_7");
            transform.SetAsLastSibling();
        }
        public MiniMapItem(Transform trans, Quaternion rotation)
            : base(trans)
        {
            mapRotation = rotation;
            SXML      xml   = XMLMgr.instance.GetSXML("mappoint");
            int       mapid = worldmap.mapid * 100;
            Transform tNpc  = getTransformByPath("npc");

            tNpc.localRotation = rotation;
            //int lv_up = (int)PlayerModel.getInstance().up_lvl;
            //int lv = (int)PlayerModel.getInstance().lvl;

            for (int i = 0; i < tNpc.childCount; i++)
            {
                Transform t = tNpc.GetChild(i);
                t.localRotation = Quaternion.Inverse(rotation);
                lNpc.Add(t.gameObject);
                //BaseButton bt = new BaseButton(t);
                //bt.onClick = onclick;


                //Transform transTxt = t.FindChild("lv");
                //if (transTxt == null)
                //    continue;
                //Text txt = transTxt.GetComponent<Text>();
                //SXML tempxml = xml.GetNode("p", "id==" + (mapid + int.Parse(t.gameObject.name)));
                //int itemLv_up = tempxml.getInt("lv_up");
                //int itemLv = tempxml.getInt("lv");
                //txt.text = ContMgr.getCont("worldmap_lv", itemLv_up.ToString(), itemLv.ToString());

                //t.GetComponent<Button>().interactable = (lv_up > itemLv_up) || (lv_up == itemLv_up && lv >= itemLv);
            }

            Transform tWay = getTransformByPath("way");

            tWay.localRotation = rotation;
            for (int i = 0; i < tWay.childCount; i++)
            {
                Transform t = tWay.GetChild(i);
                t.localRotation = Quaternion.Inverse(rotation);
            }

            Transform tMonster = getTransformByPath("monster");

            tMonster.localRotation = rotation;
            for (int i = 0; i < tMonster.childCount; i++)
            {
                Transform t = tMonster.GetChild(i);
                t.localRotation = Quaternion.Inverse(rotation);
                lMonster.Add(t.gameObject);
                //BaseButton bt = new BaseButton(t);
                //bt.onClick = onclick;



                Transform transTxt = t.FindChild("lv");
                if (transTxt == null)
                {
                    continue;
                }
                Text txt       = transTxt.GetComponent <Text>();
                SXML tempxml   = xml.GetNode("p", "id==" + (mapid + int.Parse(t.gameObject.name)));
                int  itemLv_up = tempxml.getInt("lv_up");
                int  itemLv    = tempxml.getInt("lv");
                txt.text = ContMgr.getCont("worldmap_lv", itemLv_up.ToString(), itemLv.ToString());

                //   t.GetComponent<Button>().interactable = (lv_up > itemLv_up) || (lv_up == itemLv_up && lv >= itemLv);
            }
            map = getTransformByPath("map");
            map.localRotation = rotation;
            EventTriggerListener.Get(gameObject).onPointClick = onMapClick;
            Transform main = transform.FindChild("namebt");

            if (main != null)
            {
                Transform con = main.FindChild("con");
                if (con == null)
                {
                    return;
                }

                goCon = con.gameObject;
                //for (int i = 0; i < con.GetChildCount(); i++)
                //{
                //    BaseButton bt = new BaseButton(con.GetChild(i));
                //    bt.onClick = onmapClick;
                //}


                BaseButton mainbt = new BaseButton(main.FindChild("mainbt"));
                mainbt.onClick = (GameObject go) =>
                {
                    goCon.SetActive(!goCon.active);
                };
                goCon.SetActive(false);
            }
        }
Beispiel #14
0
 void inText()
 {
     this.transform.FindChild("left/alldel/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_1"); //全部删除
     this.transform.FindChild("left/allget/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_2"); //全部领取
     this.transform.FindChild("right2/del2/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_3"); //删除
     this.transform.FindChild("right2/del1/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_3"); //删除
     this.transform.FindChild("right2/get/Text").GetComponent <Text>().text  = ContMgr.getCont("uilayer_a3_mail_4"); //领取
     this.transform.FindChild("right1/zhuti").GetComponent <Text>().text     = ContMgr.getCont("uilayer_a3_mail_5"); //主题:
     this.transform.FindChild("right1/mailtitle").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_6"); //邮件主题
     this.transform.FindChild("right1/fajianren").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_mail_7"); //发件人:
     this.transform.FindChild("right1/time1").GetComponent <Text>().text     = ContMgr.getCont("uilayer_a3_mail_8"); //日期:
 }
Beispiel #15
0
 //载入竞技奖励说明表
 void intoTab()
 {
     if (frist)
     {
         Transform con = this.transform.FindChild("GetInfo_tab/scrollview/con");
         if (con.childCount > 0)
         {
             for (int i = 0; i < con.childCount; i++)
             {
                 GameObject.Destroy(con.GetChild(i).gameObject);
             }
         }
         GameObject  item   = this.transform.FindChild("GetInfo_tab/scrollview/item").gameObject;
         List <SXML> Xml    = XMLMgr.instance.GetSXMLList("jjc.reward");
         int         length = Xml.Count;
         for (int i = length; i > 0; i--)
         {
             GameObject clon  = (GameObject)GameObject.Instantiate(item);
             SXML       itXml = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + i);
             string     name  = itXml.getString("name");
             Image      icon  = clon.transform.FindChild("icon").GetComponent <Image>();
             if (i < 10)
             {
                 icon.sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_00" + i);
             }
             else
             {
                 icon.sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_0" + i);
             }
             string color = "";
             if (i >= 10)
             {
                 color = "<color=#FFA500>";
             }
             else if (i < 10 && i >= 7)
             {
                 color = "<color=#FF00FF>";
             }
             else if (i < 7)
             {
                 color = "<color=#00BFFF>";
             }
             if (i == 1)
             {
                 clon.transform.FindChild("2/Text").GetComponent <Text>().text = "<color=#00BFFF>" + ContMgr.getCont("a3_active_bangzuan") + "</color>" + 0;
                 clon.transform.FindChild("3/Text").GetComponent <Text>().text = "<color=#00BFFF>" + ContMgr.getCont("a3_active_mingwang") + "</color>" + 0;
                 clon.transform.FindChild("4/Text").GetComponent <Text>().text = color + ContMgr.getCont("FriendProxy_wu") + "</color>";
                 clon.transform.FindChild("4/icon").gameObject.SetActive(false);
             }
             else
             {
                 int    zhuanshi = itXml.GetNode("gem").getInt("num");
                 int    mingwang = itXml.GetNode("rep").getInt("num");
                 int    box      = itXml.GetNode("box").getInt("id");
                 var    xml      = XMLMgr.instance.GetSXML("item.item", "id==" + box);
                 string bx       = xml.getString("item_name");
                 clon.transform.FindChild("2/Text").GetComponent <Text>().text    = "<color=#00BFFF>" + ContMgr.getCont("a3_active_bangzuan") + "</color>" + zhuanshi;
                 clon.transform.FindChild("3/Text").GetComponent <Text>().text    = "<color=#00BFFF>" + ContMgr.getCont("a3_active_mingwang") + "</color>" + mingwang;
                 clon.transform.FindChild("4/Text").GetComponent <Text>().text    = color + bx + "</color>";
                 clon.transform.FindChild("4/icon").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_item_" + xml.getString("icon_file"));
                 new BaseButton(clon.transform.FindChild("4")).onClick            = (GameObject go) =>
                 {
                     showtip((uint)box);
                 };
             }
             clon.transform.FindChild("1/Text").GetComponent <Text>().text = color + name + "</color>";
             clon.transform.SetParent(con, false);
             clon.SetActive(true);
         }
     }
     frist = false;
 }
Beispiel #16
0
        //刷新天数显示
        void Refresh_day_show(int day)
        {
            int thisday = A3_SevendayModel.getInstance().thisday;

            //初始化的样子
            for (int i = 0; i < obj_sevenday.Count; i++)
            {
                obj_sevenday[i].GetComponent <LayoutElement>().minWidth = 0;


                obj_sevenday[i].FindChild("that").gameObject.SetActive(day - 1 == i?true:false);

                obj_sevenday[i].FindChild("over").gameObject.SetActive(false);

                string str = string.Empty;
                switch (i)
                {
                case 0:
                    str = ContMgr.getCont("active_day1");
                    break;

                case 1:
                    str = ContMgr.getCont("active_day2");
                    break;

                case 2:
                    str = ContMgr.getCont("active_day3");
                    break;

                case 3:
                    str = ContMgr.getCont("active_day4");
                    break;

                case 4:
                    str = ContMgr.getCont("active_day5");
                    break;

                case 5:
                    str = ContMgr.getCont("active_day6");
                    break;

                case 6:
                    str = ContMgr.getCont("active_day7");
                    break;
                }
                obj_sevenday[i].FindChild("Text").GetComponent <Text>().text = str;
            }
            if (thisday < 7)
            {
                obj_sevenday[thisday - 1].FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_sevenday_today");
                obj_sevenday[thisday].FindChild("Text").GetComponent <Text>().text     = ContMgr.getCont("a3_sevenday_toww");
                obj_sevenday[thisday].GetComponent <LayoutElement>().minWidth          = 250;
                string res  = XMLMgr.instance.GetSXML("seven_days.seven_day", "day==" + (thisday + 1)).getString("item");
                string days = obj_sevenday[thisday].FindChild("Text").GetComponent <Text>().text;
                obj_sevenday[thisday].FindChild("Text").GetComponent <Text>().text = days + "<color=#FF0000>" + "(" + res + ")" + "</color>";
            }
            else
            {
                obj_sevenday[thisday - 1].FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_sevenday_today");
                obj_sevenday[6].GetComponent <LayoutElement>().minWidth = 250;
                string res  = XMLMgr.instance.GetSXML("seven_days.seven_day", "day==" + thisday).getString("item");
                string days = obj_sevenday[thisday - 1].FindChild("Text").GetComponent <Text>().text;
                obj_sevenday[thisday - 1].FindChild("Text").GetComponent <Text>().text = days + "<color=#FF0000>" + "(" + res + ")" + "</color>";
            }



            //  for (int i = 0; i < obj_sevenday.Count; i++)
            //{
            //    if (i >= (thisday - 1))
            //    {
            //        obj_sevenday[i].FindChild("over").gameObject.SetActive(false);
            //    }

            //}
        }
Beispiel #17
0
        void showtip(uint id)
        {
            tip.SetActive(true);
            a3_ItemData item = a3_BagModel.getInstance().getItemDataById(id);

            tip.transform.FindChild("text_bg/name/namebg").GetComponent <Text>().text  = item.item_name;
            tip.transform.FindChild("text_bg/name/namebg").GetComponent <Text>().color = Globle.getColorByQuality(item.quality);
            tip.transform.FindChild("text_bg/name/hasnum").GetComponent <Text>().text  = a3_BagModel.getInstance().getItemNumByTpid(id) + ContMgr.getCont("ge");
            if (item.use_limit <= 0)
            {
                tip.transform.FindChild("text_bg/name/dengji").GetComponent <Text>().text = ContMgr.getCont("a3_active_wuxianzhi");
            }
            else
            {
                tip.transform.FindChild("text_bg/name/dengji").GetComponent <Text>().text = item.use_limit + ContMgr.getCont("zhuan");
            }
            tip.transform.FindChild("text_bg/text").GetComponent <Text>().text           = StringUtils.formatText(item.desc);
            tip.transform.FindChild("text_bg/iconbg/icon").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite(item.file);

            new BaseButton(tip.transform.FindChild("close_btn")).onClick = (GameObject oo) => { tip.SetActive(false); };
        }
Beispiel #18
0
        void onMapCount(Variant v)
        {
            debug.Log("onMapCount" + v.dump());
            int res = v["res"];

            if (res < 0)
            {
                Globle.err_output(res);
                return;
            }
            if (res == 1)
            {
                uint     iid  = v["iid"];
                BaseRole Role = RoleMgr._instance.getRole(iid);
                if (Role != null && !(Role is MonsterRole))
                {
                    if (Role.m_isMain)
                    {
                        // FindBestoModel.getInstance().mapCount = v["num"];
                        if (SelfRole._inst != null)
                        {
                            if (v["way"] == 2)
                            {
                                int count = v["num"];
                                if (count - PlayerModel.getInstance().treasure_num > 0)
                                {
                                    // flytxt.instance.fly("抢夺了" + (count - PlayerModel.getInstance().treasure_num) + "张藏宝图");
                                    flytxt.instance.fly(ContMgr.getCont("FindBestoProxy_add", new List <string>()
                                    {
                                        (count - PlayerModel.getInstance().treasure_num).ToString()
                                    }));
                                }
                                else if (count - PlayerModel.getInstance().treasure_num < 0)
                                {
                                    //flytxt.instance.fly("丢失了" + (PlayerModel.getInstance().treasure_num - count) + "张藏宝图");
                                    flytxt.instance.fly(ContMgr.getCont("FindBestoProxy_reduce", new List <string>()
                                    {
                                        (PlayerModel.getInstance().treasure_num - count).ToString()
                                    }));
                                }
                            }
                            PlayerModel.getInstance().treasure_num = v["num"];
                            SelfRole._inst.mapCount = v["num"];
                            SelfRole._inst.refreshmapCount(v["num"]);
                            if (PlayerModel.getInstance().treasure_num >= 50)
                            {
                                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_BAOTUUI);
                            }
                        }
                    }
                    else
                    {
                        OtherPlayerMgr._inst.playerMapCountChange(iid, v["num"]);
                    }
                }
                if (A3_FindBesto.instan)
                {
                    A3_FindBesto.instan.refreCount();
                }
            }
            if (res == 3)
            {
                if (v["result"] == 0)
                {
                    flytxt.instance.fly(ContMgr.getCont("FindBestoProxy_nook"));
                }
                else
                {
                    flytxt.instance.fly(ContMgr.getCont("FindBestoProxy_ok"));
                }
            }
            if (res == 4)
            {
                if (v["get_collect"] == false)
                {
                    flytxt.instance.fly(ContMgr.getCont("FindBestoProxy_nothing"));
                }
            }
            if (res == 5)
            {
                dispatchEvent(GameEvent.Create(EVENT_INFO, this, v));
            }
        }
 void inText()
 {
     this.transform.FindChild("right/bottom/inforTips").GetComponent <Text>().text        = ContMgr.getCont("uilayer_a3_currentTeamPanel_1"); //*同仇敌忾:每位成员将为周围队友提供6%的攻击加成!
     this.transform.FindChild("right/bottom/btnQuitTeam/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_currentTeamPanel_2"); //退出队伍
     this.transform.FindChild("right/bottom/togInvite/Label").GetComponent <Text>().text  = ContMgr.getCont("uilayer_a3_currentTeamPanel_3"); //允许队友进行邀请
     this.transform.FindChild("right/bottom/togJoin/Label").GetComponent <Text>().text    = ContMgr.getCont("uilayer_a3_currentTeamPanel_4"); //申请直接进队
     this.transform.FindChild("right/bottom/team_object/text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_currentTeamPanel_5"); //队伍目标:
     this.transform.FindChild("right/main/body/btn_call/Text").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_currentTeamPanel_6"); //喊话
 }
Beispiel #20
0
 public string GetClancToName(int clanc)
 {
     return(ContMgr.getCont("legin_tag" + clanc, null));
 }
            public void SetInfo(ItemTeamData itd = null, bool meIsCaptain = false)
            {
                if (itd != null)
                {
                    itemTeamData   = itd;
                    cid            = itd.cid;
                    txtName.text   = itd.name;
                    txtLvl.text    = itd.zhuan + ContMgr.getCont("zhuan") + itd.lvl + ContMgr.getCont("ji");
                    txtCombat.text = itd.combpt.ToString();
                    uint carr = itd.carr;

                    if (carr == 0)
                    {
                        carr = (uint)PlayerModel.getInstance().profession;
                    }
                    if (a3_currentTeamPanel._instance.carrSpriteDic.ContainsKey(carr))
                    {
                        iconHead.sprite = a3_currentTeamPanel._instance.carrSpriteDic[carr];
                        iconHead.SetNativeSize();
                    }
                    if (itd.online)
                    {
                        iconHead.gameObject.GetComponent <Image>().material        = null;
                        iconCaptain.gameObject.GetComponent <Image>().material     = null;
                        txtName.transform.parent.GetComponent <Image>().material   = null;
                        txtLvl.transform.parent.GetComponent <Image>().material    = null;
                        txtCombat.transform.parent.GetComponent <Image>().material = null;
                    }
                    else
                    {
                        iconHead.gameObject.GetComponent <Image>().material        = a3_currentTeamPanel._instance.materialGrey;
                        iconCaptain.gameObject.GetComponent <Image>().material     = a3_currentTeamPanel._instance.materialGrey;
                        txtName.transform.parent.GetComponent <Image>().material   = a3_currentTeamPanel._instance.materialGrey;
                        txtLvl.transform.parent.GetComponent <Image>().material    = a3_currentTeamPanel._instance.materialGrey;
                        txtCombat.transform.parent.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey;
                    }
                    noEmpty.gameObject.SetActive(true);
                    empty.gameObject.SetActive(false);
                    iconCaptain.gameObject.SetActive(itd.isCaptain);
                    if (meIsCaptain && cid != PlayerModel.getInstance().cid)
                    {
                        btnRemoveTeam.gameObject.SetActive(true);
                    }
                    else
                    {
                        btnRemoveTeam.gameObject.SetActive(false);
                    }
                }
                else
                {
                    empty.gameObject.SetActive(true);
                    noEmpty.gameObject.SetActive(false);
                }
            }
Beispiel #22
0
        private void RefreshDiary(GameEvent e)
        {
            GameObject gameObjectByPath = base.getGameObjectByPath("cells/scroll/0");
            Transform  transformByPath  = base.getTransformByPath("cells/scroll/content");

            Transform[] componentsInChildren = transformByPath.GetComponentsInChildren <Transform>(true);
            for (int i = 0; i < componentsInChildren.Length; i++)
            {
                Transform transform = componentsInChildren[i];
                bool      flag      = transform.parent == transformByPath;
                if (flag)
                {
                    UnityEngine.Object.Destroy(transform.gameObject);
                }
            }
            Variant logdata = ModelBase <A3_LegionModel> .getInstance().logdata;

            bool flag2 = logdata == null || !logdata.ContainsKey("clanlog_list");

            if (!flag2)
            {
                Variant        variant = logdata["clanlog_list"];
                List <Variant> list    = new List <Variant>(variant._arr);
                list.Reverse();
                foreach (Variant current in list)
                {
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(gameObjectByPath);
                    gameObject.SetActive(true);
                    gameObject.transform.SetParent(transformByPath);
                    gameObject.transform.localPosition = Vector3.zero;
                    gameObject.transform.localScale    = Vector3.one;
                    Text    component = gameObject.transform.FindChild("text").GetComponent <Text>();
                    int     num       = current["logtp"];
                    Variant variant2  = current["log"];
                    string  item      = string.Empty;
                    string  item2     = string.Empty;
                    string  item3     = string.Empty;
                    int     num2      = 0;
                    int     num3      = 0;
                    int     num4      = 0;
                    int     num5      = 0;
                    int     num6      = 0;
                    int     num7      = 0;
                    bool    flag3     = variant2.ContainsKey("name");
                    if (flag3)
                    {
                        item = variant2["name"];
                    }
                    bool flag4 = variant2.ContainsKey("tar_name");
                    if (flag4)
                    {
                        item3 = variant2["tar_name"];
                    }
                    bool flag5 = variant2.ContainsKey("clanc");
                    if (flag5)
                    {
                        num4 = variant2["clanc"];
                    }
                    bool flag6 = variant2.ContainsKey("oldclanc");
                    if (flag6)
                    {
                        num3 = variant2["oldclanc"];
                    }
                    bool flag7 = variant2.ContainsKey("money");
                    if (flag7)
                    {
                        num5 = variant2["money"];
                    }
                    bool flag8 = variant2.ContainsKey("name");
                    if (flag8)
                    {
                        item2 = variant2["name"];
                    }
                    bool flag9 = variant2.ContainsKey("guard_time");
                    if (flag9)
                    {
                        num2 = variant2["guard_time"];
                    }
                    bool flag10 = variant2.ContainsKey("repair_cost");
                    if (flag10)
                    {
                        num7 = variant2["repair_cost"];
                    }
                    bool flag11 = variant2.ContainsKey("clan_lvl");
                    if (flag11)
                    {
                        num6 = variant2["clan_lvl"];
                    }
                    switch (num)
                    {
                    case 1:
                    {
                        string item4  = string.Empty;
                        bool   flag12 = num4 < num3;
                        if (flag12)
                        {
                            item4 = "降级";
                        }
                        else
                        {
                            item4 = "升级";
                        }
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                            {
                                item3,
                                item,
                                item4,
                                ModelBase <A3_LegionModel> .getInstance().GetClancToName(num4)
                            });
                        break;
                    }

                    case 2:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item,
                            ModelBase <A3_LegionModel> .getInstance().myLegion.lvl.ToString()
                        });
                        break;

                    case 3:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            A3_LegionModel.GetCarr(ModelBase <PlayerModel> .getInstance().profession),
                            item,
                            num5.ToString()
                        });
                        break;

                    case 4:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item2
                        });
                        break;

                    case 5:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item2
                        });
                        break;

                    case 6:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item3,
                            item
                        });
                        break;

                    case 7:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item
                        });
                        break;

                    case 8:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item
                        });
                        break;

                    case 9:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item3,
                            item
                        });
                        break;

                    case 10:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            item,
                            item3
                        });
                        break;

                    case 11:
                    {
                        bool flag13 = num6 <= 1;
                        if (flag13)
                        {
                            component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                                {
                                    (4 - num2).ToString()
                                });
                        }
                        else
                        {
                            component.text = ContMgr.getCont("clan_log_12", new List <string>
                                {
                                    (4 - num2).ToString(),
                                    (num6 - 1).ToString()
                                });
                        }
                        break;
                    }

                    case 12:
                        component.text = ContMgr.getCont("clan_log_14", new List <string>
                        {
                            num6.ToString()
                        });
                        break;

                    case 13:
                        component.text = ContMgr.getCont("clan_log_" + num, new List <string>
                        {
                            num7.ToString()
                        });
                        break;
                    }
                }
                transformByPath.GetComponent <RectTransform>().sizeDelta = new Vector2(0f, transformByPath.GetComponent <GridLayoutGroup>().cellSize.y *(float)variant._arr.Count);
            }
        }
Beispiel #23
0
        public override void onShowed()
        {
            if (room is MLZDRoom)
            {
                //打开活动界面
                ismlzd = true;
            }

            InterfaceMgr.getInstance().closeAllWin();
            a3_insideui_fb.instance?.enter_pic2.SetActive(false);
            jjc.SetActive(false);
            jdzc.SetActive(false);
            cityWAr.SetActive(false);
            ar_result.SetActive(false);
            getGameObjectByPath("win/success").SetActive(false);
            getGameObjectByPath("state_successed").SetActive(false);
            transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(false);
            transform.FindChild("state_successed/bg/getNum").gameObject.SetActive(false);
            tip_text.SetActive(true);
            bgdefet.SetActive(false);
            bgwin.SetActive(false);
            yiwufb_defet.SetActive(false);
            //  closefb_way = false;
            transform.FindChild("btn_close/closeTime").gameObject.SetActive(false);
            //createAvatar();
            closetime  = 0;
            close_time = 0;
            Variant data = (Variant)uiData[0];

            if (data.ContainsKey("ltpid"))
            {
                ltpid = data["ltpid"];
            }
            if (data.ContainsKey("score"))
            {
                score = data["score"];
            }
            else
            {
                score = 0;
            }

            if (data.ContainsKey("close_tm"))
            {
                double ct = data["close_tm"];
                closetime = ct;
            }
            if (data.ContainsKey("win"))
            {
                int ct = data["win"];

                Transform wint = getTransformByPath("win");
                wint.gameObject.SetActive(true);
                if (ct > 0 && wint != null)
                {
                    wint.FindChild("success").gameObject.SetActive(true);
                    wint.FindChild("fail").gameObject.SetActive(false);
                }
                else if (wint != null)
                {
                    closeWindow();
                    // InterfaceMgr.getInstance().floatUI.localScale = Vector3.zero;
                    if (GameObject.Find("GAME_CAMERA/myCamera"))
                    {
                        GameObject cameraOBJ = GameObject.Find("GAME_CAMERA/myCamera");
                        if (!cameraOBJ.GetComponent <DeathShader>())
                        {
                            cameraOBJ.AddComponent <DeathShader>();
                        }
                        else
                        {
                            cameraOBJ.GetComponent <DeathShader>().enabled = true;
                        }
                    }
                    wint.FindChild("success").gameObject.SetActive(false);
                    wint.FindChild("fail").gameObject.SetActive(true);


                    getGameObjectByPath("state_successed").SetActive(false);
                }
                if (data.ContainsKey("item_drop"))
                {
                    ct = data["item_drop"]._arr.Count;
                }
                else
                {
                    ct = 0;
                }
                if (ct >= 0)
                {
                    getGameObjectByPath("state_successed").SetActive(true);
                    //getGameObjectByPath("state_failed").SetActive(false);

                    finishTiem = getComponentByPath <Text>("state_successed/bg/fnTime/time");
                    kmNum      = getComponentByPath <Text>("state_successed/bg/kmNum/num");
                    getNum     = getComponentByPath <Text>("state_successed/bg/getNum/num");
                    goldNum    = getComponentByPath <Text>("state_successed/bg/goldNum/num");
                }
                else
                {
                    getGameObjectByPath("state_successed").SetActive(false);
                    //getGameObjectByPath("state_failed").SetActive(true);
                    //finishTiem = getComponentByPath<Text>("state_failed/bg/fnTime/time");
                    //kmNum = getComponentByPath<Text>("state_failed/bg/kmNum/num");
                    //getNum = getComponentByPath<Text>("state_failed/bg/getNum/num");
                    //goldNum = getComponentByPath<Text>("state_failed/bg/goldNum/num");
                }
            }

            finishtime = 0;
            if (uiData.Count > 1)
            {
                finishtime = (double)uiData[1];
            }
            //TimeSpan ts = new TimeSpan(0, 0, (int)finishtime);

            float tss = 0;
            uint  tkn = 0, ten = 0, tgn = 0;
            int   ach = 0, mon = 0;

            DOTween.To(() => tss, (float s) =>
            {
                TimeSpan ts     = new TimeSpan(0, 0, (int)s);
                finishTiem.text = (int)ts.TotalHours + ":" + (int)ts.Minutes + ":" + (int)ts.Seconds;
            }, (float)finishtime, 1f);

            evaluation(score);

            kmnum = 0;
            if (uiData.Count > 2)
            {
                kmnum = (int)uiData[2];
            }
            DOTween.To(() => (int)tkn, (int s) =>
            {
                tkn        = (uint)s;
                kmNum.text = tkn.ToString();
            }, kmnum, 1f);


            if (room is MoneyRoom)
            {
                if (room != null)
                {
                    transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(true);
                }
            }


            if (room is ExpRoom)
            {
                if (room != null)
                {
                    transform.FindChild("state_successed/bg/getNum").gameObject.SetActive(true);
                }
            }
            //if (room != null)
            //{
            //    goldnum = room.goldnum;
            //}
            //DOTween.To(() => tgn, (uint s) =>
            //{
            //    tgn = s;
            //    goldNum.text = tgn.ToString();
            //}, goldnum, 1f);

            //}


            if (room is PVPRoom)
            {
                if (room != null)
                {
                    getach = room.getach;
                }
                DOTween.To(() => ach, (int s) =>
                {
                    ach         = s;
                    getNum.text = ach.ToString();
                }, getach, 1f);

                if (room != null)
                {
                    getmoney = room.getExp;
                }
                DOTween.To(() => mon, (int s) =>
                {
                    mon          = s;
                    goldNum.text = mon.ToString();
                }, getmoney, 1f);

                MapProxy.getInstance().Win_uiData = "sports_jjc";
                MapProxy.getInstance().openWin    = InterfaceMgr.A3_SPORTS;
            }
            else
            {
                if (room != null)
                {
                    getnum = room.expnum;
                }
                DOTween.To(() => ten, (uint s) =>
                {
                    ten         = s;
                    getNum.text = ten.ToString();
                }, getnum, 1f);
                if (room != null)
                {
                    //goldnum = room.goldnum;
                    goldnum = a3_insideui_fb.AllMoneynum;
                }
                DOTween.To(() => tgn, (uint s) =>
                {
                    tgn          = s;
                    goldNum.text = tgn.ToString();
                }, goldnum, 1f);
            }
            //if (data.ContainsKey("ltpid")) {
            //    int tid = data["ltpid"];
            //    if (tid == 101) {
            //        getNum.text = "获得经验量:" + getnum;
            //    }
            //    else if (tid == 102) {
            //        getNum.text = "获得金币量:" + getnum;
            //    }
            //}
            _NewOne     = true;
            instance    = this;
            room.getExp = 0;
            room.getach = 0;

            Variant d = SvrLevelConfig.instacne.get_level_data(ltpid);

            if (data["win"] == 0 || room is PVPRoom || d.ContainsKey("shengwu") || room is PlotRoom || room is ExpRoom || room is MoneyRoom || room is FSWZRoom || room is MLZDRoom || room is JDZCRoom || room is CityWarRoom)
            {
                a3_liteMinimap.instance?.taskinfo?.SetActive(true);
                a3_insideui_fb.instance?.enter_pic2?.SetActive(false);

                LevelProxy.getInstance().open_pic = false;
                closefb_way = true;
                //InterfaceMgr.getInstance().close(InterfaceMgr.TARGET_HEAD);
            }
            else
            {
                closefb_way = false;
            }


            if (closefb_way == true)
            {
                close_time = 0;
                transform.FindChild("btn_close/closeTime").gameObject.SetActive(true);
            }
            if (closefb_way == false)
            {
                close_time = (double)closetime - (double)muNetCleint.instance.CurServerTimeStamp - 3;
                transform.FindChild("btn_close/closeTime").gameObject.SetActive(false);
            }

            if (d.ContainsKey("shengwu") && d.ContainsKey("icon"))
            {
                shengwu = d["shengwu"];
                icon    = d["icon"];
                if (data["win"] == 0)
                {
                    jjc.SetActive(false);
                    jdzc.SetActive(false);
                    cityWAr.SetActive(false);
                    ar_result.SetActive(false);
                    getGameObjectByPath("win").SetActive(false);
                    getGameObjectByPath("win/success").SetActive(false);
                    getGameObjectByPath("state_successed").SetActive(false);
                    transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(false);
                    bgdefet.SetActive(false);
                    bgwin.SetActive(false);
                    yiwufb_defet.SetActive(true);
                    return;
                }
            }
            else
            {
                shengwu = 0;
            }
            if (data["win"] == 1 && d.ContainsKey("shengwu") && d.ContainsKey("des"))
            {
                icon1 = d["des"];
                string[] codess = icon1.Split(',');
                // SXML xml = XMLMgr.instance.GetSXML("accent_relic.relic", "type=="+codess[0].ToString());
                //mid = xml.getUint("obj");
                List <SXML> listSxml = null;
                if (listSxml == null)
                {
                    listSxml = XMLMgr.instance.GetSXMLList("accent_relic.relic");
                    //List<SXML> xml2 = XMLMgr.instance.GetSXMLList("accent_relic.relic", "carr=="+ PlayerModel.getInstance().profession);     , "carr==" + PlayerModel.getInstance().profession
                    for (int i = 0; i < listSxml.Count; i++)
                    {
                        if (listSxml[i].getInt("carr") == PlayerModel.getInstance().profession&& listSxml[i].getString("type") == codess[0].ToString())
                        {
                            List <SXML> god_id = listSxml[i].GetNodeList("relic_god", "id==" + codess[1].ToString());
                            {
                                foreach (SXML x in god_id)
                                {
                                    text1.text = x.getString("des1");
                                    text2.text = x.getString("des2");
                                }
                            }
                        }
                    }
                }



                //foreach (SXML x in xml)
                //{
                //    if (x.getString("id") == codess[1])
                //    {
                //        text1.text = x.getString("des1");
                //        text2.text = x.getString("des2");
                //    }
                // }


                //    if (xml.getInt("carr") == PlayerModel.getInstance().profession)
                //{

                //    text1.text = xml.getString("des1");
                //    text2.text = xml.getString("des2");

                //}
            }



            if (shengwu == 1)
            {
                ar_result.SetActive(true);
                string[] codes = icon.Split(',');
                if (PlayerModel.getInstance().profession == 2)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[0]);
                }
                if (PlayerModel.getInstance().profession == 3)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[1]);
                }
                if (PlayerModel.getInstance().profession == 5)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[2]);
                }

                bgwin.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("win/success").SetActive(false);
                transform.FindChild("state_successed").gameObject.SetActive(false);
                jjc.SetActive(false);
                jdzc.SetActive(false);
                cityWAr.SetActive(false);
            }
            jjc.SetActive(false);
            jdzc.SetActive(false);
            cityWAr.SetActive(false);
            if (room is PVPRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];
                    if (cct == 0)
                    {
                        jjc.SetActive(true);
                        jjc.transform.FindChild("vector").gameObject.SetActive(false);
                        jjc.transform.FindChild("defet").gameObject.SetActive(true);
                    }
                    else
                    {
                        jjc.SetActive(true);
                        jjc.transform.FindChild("vector").gameObject.SetActive(true);
                        jjc.transform.FindChild("defet").gameObject.SetActive(false);
                    }
                    int aa = a3_sportsModel.getInstance().grade;
                    if (aa < 10)
                    {
                        icon_star.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_00" + aa);
                    }
                    else
                    {
                        icon_star.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_0" + aa);
                    }
                    if (a3_sportsModel.getInstance().grade <= 0)
                    {
                        return;
                    }
                    SXML Xml        = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + a3_sportsModel.getInstance().grade);
                    int  pointCount = Xml.getInt("star");
                    if (pointCount <= 0)
                    {
                        return;
                    }
                    Transform star = this.transform.FindChild("jjc/star");
                    for (int i = 0; i < star.childCount; i++)
                    {
                        star.GetChild(i).FindChild("this").gameObject.SetActive(false);
                        star.GetChild(i).gameObject.SetActive(false);
                    }
                    for (int m = pointCount; m > 0; m--)
                    {
                        star.GetChild(m - 1).gameObject.SetActive(true);
                    }
                    for (int j = 0; j < a3_sportsModel.getInstance().score; j++)
                    {
                        star.GetChild(j).FindChild("this").gameObject.SetActive(true);
                    }
                }
            }

            if (room is JDZCRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                jdzc.SetActive(false);
                cityWAr.SetActive(false);
                tip_text.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];
                    jdzc.SetActive(true);

                    if (cct == 0)
                    {
                        GameObject item = jdzc.transform.FindChild("fail/gift/reward").gameObject;
                        Transform  con  = jdzc.transform.FindChild("fail/gift/contain");
                        jdzc.transform.FindChild("win").gameObject.SetActive(false);
                        jdzc.transform.FindChild("fail").gameObject.SetActive(true);
                        SXML        Xml_lose = XMLMgr.instance.GetSXML("pointarena.lose_reward");
                        List <SXML> rew      = Xml_lose.GetNodeList("RewardItem");
                        foreach (SXML one in rew)
                        {
                            GameObject clon = Instantiate(item) as GameObject;
                            clon.SetActive(true);
                            clon.transform.SetParent(con, false);
                            uint       id   = (uint)one.getInt("item_id");
                            int        num  = one.getInt("value");
                            GameObject icon = IconImageMgr.getInstance().createA3ItemIcon(id);
                            icon.transform.SetParent(clon.transform.FindChild("pic/icon"), false);
                            clon.transform.FindChild("pic/num").GetComponent <Text>().text = num.ToString();
                        }
                    }
                    else
                    {
                        GameObject item = jdzc.transform.FindChild("win/gift/reward").gameObject;
                        Transform  con  = jdzc.transform.FindChild("win/gift/contain");
                        jdzc.transform.FindChild("win").gameObject.SetActive(true);
                        jdzc.transform.FindChild("fail").gameObject.SetActive(false);
                        SXML        Xml_win = XMLMgr.instance.GetSXML("pointarena.win_reward");
                        List <SXML> rew     = Xml_win.GetNodeList("RewardItem");
                        foreach (SXML one in rew)
                        {
                            GameObject clon = Instantiate(item) as GameObject;
                            clon.SetActive(true);
                            clon.transform.SetParent(con, false);
                            uint       id   = (uint)one.getInt("item_id");
                            int        num  = one.getInt("value");
                            GameObject icon = IconImageMgr.getInstance().createA3ItemIcon(id);
                            icon.transform.SetParent(clon.transform.FindChild("pic/icon"), false);
                            clon.transform.FindChild("pic/num").GetComponent <Text>().text = num.ToString();
                        }
                    }
                }
            }

            if (room is CityWarRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                jdzc.SetActive(false);
                tip_text.SetActive(false);
                cityWAr.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                cityWAr.transform.FindChild("win/warinfo").gameObject.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];

                    cityWAr.SetActive(true);
                    if (cct == 0)
                    {
                        GameObject item = cityWAr.transform.FindChild("fail/gift/reward").gameObject;
                        Transform  con  = cityWAr.transform.FindChild("fail/gift/contain");
                        cityWAr.transform.FindChild("win").gameObject.SetActive(false);
                        cityWAr.transform.FindChild("fail").gameObject.SetActive(true);
                        if (PlayerModel.getInstance().lvlsideid == 1)
                        {//攻城
                            SXML        Xml_win   = XMLMgr.instance.GetSXML("clanwar.atk_awd", "min==" + 0);
                            List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                            List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                            setAwd(con, item, rew, awds_coin);
                        }
                        else
                        {
                            //守城
                            SXML        Xml_win   = XMLMgr.instance.GetSXML("clanwar.def_awd", "min==" + 0);
                            List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                            List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                            setAwd(con, item, rew, awds_coin);
                        }
                    }

                    else
                    {
                        GameObject item = cityWAr.transform.FindChild("win/gift/reward").gameObject;
                        Transform  con  = cityWAr.transform.FindChild("win/gift/contain");
                        cityWAr.transform.FindChild("win").gameObject.SetActive(true);
                        cityWAr.transform.FindChild("fail").gameObject.SetActive(false);
                        if (PlayerModel.getInstance().lvlsideid == 1)
                        {//攻城
                            int i = data["rank"];
                            if (data["win_clanid"])
                            {
                                cityWAr.transform.FindChild("win/warinfo").gameObject.SetActive(true);
                                if (A3_LegionModel.getInstance().myLegion != null && A3_LegionModel.getInstance().myLegion.id == data["win_clanid"])
                                {
                                    cityWAr.transform.FindChild("win/warinfo").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_11");
                                }
                                else
                                {
                                    cityWAr.transform.FindChild("win/warinfo").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_12");
                                }
                            }
                            cityWAr.transform.FindChild("win/info").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_9", new List <string> {
                                i.ToString()
                            });
                            SXML        Xml_win = XMLMgr.instance.GetSXML("clanwar");
                            List <SXML> awd     = Xml_win.GetNodeList("atk_awd");
                            foreach (SXML s in awd)
                            {
                                if (s.getInt("min") <= i && s.getInt("max") >= i)
                                {
                                    List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                                    List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                                    setAwd(con, item, rew, awds_coin);
                                    break;
                                }
                            }
                        }
                        else
                        {
                            //守城
                            int i = data["hpper"];
                            cityWAr.transform.FindChild("win/info").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_10", new List <string> {
                                i.ToString()
                            });
                            SXML        Xml_win = XMLMgr.instance.GetSXML("clanwar");
                            List <SXML> awd     = Xml_win.GetNodeList("def_awd");
                            foreach (SXML s in awd)
                            {
                                if (s.getInt("min") <= i && s.getInt("max") >= i)
                                {
                                    List <SXML> rew       = s.GetNodeList("RewardItem");
                                    List <SXML> awds_coin = s.GetNodeList("RewardValue");
                                    setAwd(con, item, rew, awds_coin);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #24
0
        public override void init()
        {
            sport_Obj.transform.FindChild("myinfo/Text").GetComponent <Text>().text                     = ContMgr.getCont("a3_sports_jdzc_0");
            sport_Obj.transform.FindChild("myinfo/Text1").GetComponent <Text>().text                    = ContMgr.getCont("a3_sports_jdzc_1");
            sport_Obj.transform.FindChild("find/text1").GetComponent <Text>().text                      = ContMgr.getCont("a3_sports_jdzc_2");
            sport_Obj.transform.FindChild("find/text2").GetComponent <Text>().text                      = ContMgr.getCont("a3_sports_jdzc_3");
            sport_Obj.transform.FindChild("Text 2").GetComponent <Text>().text                          = ContMgr.getCont("a3_sports_jdzc_4");
            sport_Obj.transform.FindChild("GetInfo_tab/Text").GetComponent <Text>().text                = ContMgr.getCont("a3_sports_jdzc_5");
            sport_Obj.transform.FindChild("GetInfo_tab/shuoming/Text").GetComponent <Text>().text       = ContMgr.getCont("a3_sports_jdzc_6");
            sport_Obj.transform.FindChild("GetInfo_tab/shuoming/Image/Text").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jdzc_7");
            sport_Obj.transform.FindChild("GetInfo_tab/tab_top/1/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_14");
            sport_Obj.transform.FindChild("GetInfo_tab/tab_top/2/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_15");
            sport_Obj.transform.FindChild("GetInfo_tab/tab_top/3/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_16");
            sport_Obj.transform.FindChild("GetInfo_tab/tab_top/4/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_17");
            sport_Obj.transform.FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jdzc_7");
            sport_Obj.transform.FindChild("tip/text_bg/name/has").GetComponent <Text>().text     = ContMgr.getCont("a3_sports_jjc_20");
            sport_Obj.transform.FindChild("tip/text_bg/name/lite").GetComponent <Text>().text    = ContMgr.getCont("a3_sports_jjc_21");
            sport_Obj.transform.FindChild("Finding/back/Text").GetComponent <Text>().text        = ContMgr.getCont("a3_sports_jjc_19");
            sport_Obj.transform.FindChild("Finding/timetxt").GetComponent <Text>().text          = ContMgr.getCont("a3_sports_jdzc_9");
            sport_Obj.transform.FindChild("Finding/EstimatedTimetxt").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jdzc_10");
            sport_Obj.transform.FindChild("ToSure/timeGo/Text").GetComponent <Text>().text       = ContMgr.getCont("a3_sports_jdzc_11");
            sport_Obj.transform.FindChild("ToSure/true/Text").GetComponent <Text>().text         = ContMgr.getCont("a3_sports_jdzc_12");



            _instan     = this;
            header_img  = sport_Obj.transform.FindChild("m_rank/rank_text").GetComponent <Image>();
            header_icon = sport_Obj.transform.FindChild("m_rank/rank_icon").GetComponent <Image>();

            MyScore   = sport_Obj.transform.FindChild("myinfo/Score").GetComponent <Text>();
            MyRanking = sport_Obj.transform.FindChild("myinfo/ranking").GetComponent <Text>();
            tip       = sport_Obj.transform.FindChild("tip").gameObject;
            tosureCon = sport_Obj.transform.FindChild("ToSure").gameObject;
            findCon   = sport_Obj.transform.FindChild("Finding").gameObject;
            TimeRun   = tosureCon.transform.FindChild("timeGo/time").GetComponent <Text>();

            Find_Time     = findCon.transform.FindChild("Time").GetComponent <Text>();
            EstimatedTime = findCon.transform.FindChild("EstimatedTime").GetComponent <Text>();

            new BaseButton(this.transform.FindChild("btn_rank")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_SPORTS);
                goBack = true;
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_RANK);
            };

            new BaseButton(sport_Obj.transform.FindChild("Get_tab_bt")).onClick = (GameObject go) => {
                sport_Obj.transform.FindChild("GetInfo_tab").gameObject.SetActive(true);
                setRewTab();
            };

            new BaseButton(sport_Obj.transform.FindChild("GetInfo_tab/back")).onClick = (GameObject go) =>
            {
                sport_Obj.transform.FindChild("GetInfo_tab").gameObject.SetActive(false);
            };


            new BaseButton(sport_Obj.transform.FindChild("find")).onClick = (GameObject go) => {
                a3_sportsProxy.getInstance().find_game();
            };

            new BaseButton(sport_Obj.transform.FindChild("Finding/back")).onClick = (GameObject go) => {
                a3_sportsProxy.getInstance().cancel_game();
            };

            new BaseButton(sport_Obj.transform.FindChild("ToSure/yes")).onClick = (GameObject go) => {
                a3_sportsProxy.getInstance().toSure_game(true);
            };

            new BaseButton(sport_Obj.transform.FindChild("ToSure/no")).onClick = (GameObject go) => {
                a3_sportsProxy.getInstance().toSure_game(false);
            };

            new BaseButton(sport_Obj.transform.FindChild("Get_tab_rank")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_SPORTS);
                goBack = true;
                ArrayList l = new ArrayList();
                l.Add(5);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_RANKING, l);
            };
        }
Beispiel #25
0
        public void refesh()
        {
            //jason   不能使用这种txt.material 这里一改,所有的字的material都看不到了!
            return;

            txt.text = PlayerModel.getInstance().inDefendArea ?  ContMgr.getCont("pk_notify_out") : ContMgr.getCont("pk_notify_in");

            if (sq != null)
            {
                sq.Kill();
            }

            Color color = txt.material.GetColor("_Color");

            color.a = 1f;
            txt.material.SetColor("_Color", color);
            sq = DOTween.Sequence()
                 .Append(txt.material.DOFade(0, 1f).From())
                 .AppendInterval(5f).Append(txt.material.DOFade(0, 1f))
                 .AppendCallback(() => { InterfaceMgr.getInstance().close(InterfaceMgr.PK_NOTIFY); });
        }
Beispiel #26
0
        public override void init()
        {
            #region 初始化汉字
            this.transform.FindChild("info/Button/Text").GetComponent <Text>().text        = ContMgr.getCont("a3_sports_jjc_0");
            this.transform.FindChild("find_info/find/text1").GetComponent <Text>().text    = ContMgr.getCont("a3_sports_jjc_1");
            this.transform.FindChild("find_info/find/text2").GetComponent <Text>().text    = ContMgr.getCont("a3_sports_jjc_2");
            this.transform.FindChild("find_info/no_open/text1").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jjc_3");
            this.transform.FindChild("find_info/day_count").GetComponent <Text>().text     = ContMgr.getCont("a3_sports_jjc_4");
            this.transform.FindChild("find_info/buy_count").GetComponent <Text>().text     = ContMgr.getCont("a3_sports_jjc_5");
            this.transform.FindChild("rank/Text").GetComponent <Text>().text                       = ContMgr.getCont("a3_sports_jjc_6");
            this.transform.FindChild("Gift/last_rank/text").GetComponent <Text>().text             = ContMgr.getCont("a3_sports_jjc_7");
            this.transform.FindChild("Gift/geted").GetComponent <Text>().text                      = ContMgr.getCont("a3_sports_jjc_8");
            this.transform.FindChild("Gift/nullrew").GetComponent <Text>().text                    = ContMgr.getCont("a3_sports_jjc_9");
            this.transform.FindChild("reward/tet").GetComponent <Text>().text                      = ContMgr.getCont("a3_sports_jjc_10");
            this.transform.FindChild("GetInfo_tab/Text").GetComponent <Text>().text                = ContMgr.getCont("a3_sports_jjc_11");
            this.transform.FindChild("GetInfo_tab/shuoming/Text").GetComponent <Text>().text       = ContMgr.getCont("a3_sports_jjc_12");
            this.transform.FindChild("GetInfo_tab/shuoming/Image/Text").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jjc_13");
            this.transform.FindChild("GetInfo_tab/tab_top/1/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_14");
            this.transform.FindChild("GetInfo_tab/tab_top/2/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_15");
            this.transform.FindChild("GetInfo_tab/tab_top/3/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_16");
            this.transform.FindChild("GetInfo_tab/tab_top/4/Text").GetComponent <Text>().text      = ContMgr.getCont("a3_sports_jjc_17");
            this.transform.FindChild("Text").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jjc_18");
            this.transform.FindChild("Finding/back/Text").GetComponent <Text>().text     = ContMgr.getCont("a3_sports_jjc_19");
            this.transform.FindChild("tip/text_bg/name/has").GetComponent <Text>().text  = ContMgr.getCont("a3_sports_jjc_20");
            this.transform.FindChild("tip/text_bg/name/lite").GetComponent <Text>().text = ContMgr.getCont("a3_sports_jjc_21");
            #endregion


            tip       = this.transform.FindChild("tip").gameObject;
            findCount = this.transform.FindChild("find_info/day_count/text").GetComponent <Text>();
            buyCount  = this.transform.FindChild("find_info/buy_count/text").GetComponent <Text>();
            // giftzuanshi = this.transform.FindChild("GetReward/tem1/zuan/bg_text/tex").GetComponent<Text>();
            // giftmingwang = this.transform.FindChild("GetReward/tem1/mingwang/bg_text/tex").GetComponent<Text>();
            // box = this.transform.FindChild("GetReward/tem1/box_name/tex").GetComponent<Text>();
            buy_Count_zuan = this.transform.FindChild("find_info/find/text2/text").GetComponent <Text>();
            rank           = this.transform.FindChild("info/icon").GetComponent <Image>();
            duanwei        = this.transform.FindChild("info/duanwei").GetComponent <Text>();
            top_saiji      = this.transform.FindChild("top_text").GetComponent <Text>();
            no_open        = this.transform.FindChild("find_info/no_open").gameObject;
            yes_open       = this.transform.FindChild("find_info/find").gameObject;
            new BaseButton(getTransformByPath("reward")).onClick = (GameObject go) =>
            {
                a3_sportsProxy.getInstance().SendPVP(5);
            };
            new BaseButton(getTransformByPath("rank")).onClick = (GameObject go) =>
            {
                //排行
            };
            new BaseButton(getTransformByPath("find_info/find")).onClick = (GameObject go) =>
            {
                if (a3_active.MwlrIsDoing)
                {
                    ArrayList ast = new ArrayList();
                    ast.Add(fb_type.jjc);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_MWLRCHANGE, ast);
                }
                else
                {
                    EnterOnClick();
                }
            };
            new BaseButton(getTransformByPath("Get_tab_bt")).onClick = (GameObject go) =>
            {
                //this.transform.FindChild("GetReward/tem1").gameObject.SetActive(false);
                this.transform.FindChild("GetInfo_tab").gameObject.SetActive(true);
                intoTab();
            };
            new BaseButton(getTransformByPath("GetInfo_tab/back")).onClick = (GameObject go) =>
            {
                //this.transform.FindChild("GetReward/tem1").gameObject.SetActive(true);
                this.transform.FindChild("GetInfo_tab").gameObject.SetActive(false);
            };
            new BaseButton(getTransformByPath("Finding/back")).onClick = (GameObject go) =>
            {
                //取消匹配
                a3_sportsProxy.getInstance().SendPVP(3);
            };
            ref_zuan_count();
        }
        private void RefreshAtt(int carr, int stage, int lvl)
        {
            GameObject  tempPgaeAtt = this.transform.FindChild("playerInfo/panel_attr/att/att_temp").gameObject;
            SXML        carrXml     = XMLMgr.instance.GetSXML("wings.wing", "career==" + carr);
            SXML        satgeXml    = carrXml.GetNode("wing_stage", "stage_id==" + stage);
            SXML        lvlXml      = satgeXml.GetNode("wing_level", "level_id==" + lvl);
            List <SXML> atts        = lvlXml.GetNodeList("att", null);

            this.transform.FindChild("playerInfo/panel_attr/name").GetComponent <Text>().text = satgeXml.getString("name");
            this.transform.FindChild("playerInfo/panel_attr/lv").GetComponent <Text>().text   = "LV" + lvl + "(" + stage + ContMgr.getCont("a3_auction_jie") + ")";

            Transform con = this.transform.FindChild("playerInfo/panel_attr/att/grid");

            for (int i = 0; i < con.childCount; i++)
            {
                Destroy(con.GetChild(i).gameObject);
            }

            Dictionary <int, string> dicAtt = new Dictionary <int, string>();

            int   att_type;
            float att_value;

            string[] attackStr = new string[2];

            for (int j = 0; j < atts.Count; j++)
            {
                att_type  = atts[j].getInt("att_type");
                att_value = atts[j].getFloat("att_value");

                if (att_type == 5)
                {
                    attackStr[1] = att_value.ToString();
                    dicAtt.Add(att_type, "");
                }
                else if (att_type == 38)
                {
                    attackStr[0] = att_value.ToString();
                }
                else
                {
                    dicAtt.Add(att_type, att_value.ToString());
                }
            }
            if (dicAtt.ContainsKey(5))
            {
                dicAtt[5] = attackStr[0] + "-" + attackStr[1];
            }
            int k          = 0;
            int childCount = con.childCount;

            //List<int> listKeys = dicAtt.Keys.ToList<int>();
            foreach (int att in dicAtt.Keys)
            {
                GameObject attentity;
                attentity = GameObject.Instantiate(tempPgaeAtt) as GameObject;
                attentity.transform.SetParent(con, false);
                attentity.gameObject.SetActive(true);
                Text textName  = attentity.transform.FindChild("text_name").GetComponent <Text>();
                Text textValue = attentity.transform.FindChild("text_value").GetComponent <Text>();
                textName.text  = Globle.getAttrNameById(att);
                textValue.text = dicAtt[att];
            }
        }
Beispiel #28
0
        private void refresh_opentime()
        {
            List <SXML> opentimeList = XMLMgr.instance.GetSXML("jjc").GetNodeList("t");
            int         i            = 0;
            int         timezoneSpan = (DateTime.Now - DateTime.UtcNow).Hours;

            if (timezoneSpan < 0)
            {
                timezoneSpan = timezoneSpan + 12;
            }
            int cur_h = (muNetCleint.instance.CurServerTimeStamp / 3600 + timezoneSpan) % 24;

            for (; i < opentimeList.Count; i++)
            {
                int open_h = int.Parse(opentimeList[i].getString("opnetime").Split(',')[0]);
                if (cur_h < open_h)
                {
                    no_open.transform.FindChild("text1").GetComponent <Text>().text = ContMgr.getCont("a3_active_open_time", new List <string> {
                        open_h.ToString()
                    });
                    break;
                }
            }
            if (opentimeList.Count > 0 && i == opentimeList.Count)
            {
                no_open.transform.FindChild("text1").GetComponent <Text>().text = ContMgr.getCont("a3_active_opentmmo_time", new List <string> {
                    opentimeList[0].getString("opnetime").Split(',')[0]
                });
            }
        }
        public override void init()
        {
            getComponentByPath <Text>("playerInfo/panel_attr/team").text    = ContMgr.getCont("a3_targetinfo_0");
            getComponentByPath <Text>("playerInfo/panel_attr/no_team").text = ContMgr.getCont("a3_targetinfo_1");
            getComponentByPath <Text>("playerInfo/panel_attr/attr_scroll/scroll/contain/1/name").text = ContMgr.getCont("a3_targetinfo_2");
            getComponentByPath <Text>("playerInfo/panel_attr/attr_scroll/scroll/contain/2/name").text = ContMgr.getCont("a3_targetinfo_3");
            getComponentByPath <Text>("playerInfo/panel_attr/attr_scroll/scroll/contain/3/name").text = ContMgr.getCont("a3_targetinfo_4");
            getComponentByPath <Text>("playerInfo/panel_attr/att/atk/value").text               = ContMgr.getCont("a3_targetinfo_5");
            getComponentByPath <Text>("playerInfo/panel_attr/att/hp/value").text                = ContMgr.getCont("a3_targetinfo_6");
            getComponentByPath <Text>("playerInfo/panel_attr/att/phydef/value").text            = ContMgr.getCont("a3_targetinfo_7");
            getComponentByPath <Text>("playerInfo/panel_attr/att/manadef/value").text           = ContMgr.getCont("a3_targetinfo_8");
            getComponentByPath <Text>("eqtip/info/attr_scroll/scroll/contain/attr1/title").text = ContMgr.getCont("a3_targetinfo_9");
            getComponentByPath <Text>("eqtip/info/attr_scroll/scroll/contain/attr2/title").text = ContMgr.getCont("a3_targetinfo_10");
            getComponentByPath <Text>("eqtip/info/attr_scroll/scroll/contain/attr3/title").text = ContMgr.getCont("a3_targetinfo_11");
            getComponentByPath <Text>("eqtip/info/attr_scroll/scroll/contain/attr4/title").text = ContMgr.getCont("a3_targetinfo_12");
            getComponentByPath <Text>("eqtip/info/cancel/Text").text        = ContMgr.getCont("a3_targetinfo_13");
            getComponentByPath <Text>("playerInfo/panel_attr/att/atk").text = ContMgr.getCont("a3_targetinfo_14");
            getComponentByPath <Text>("ig_bg1/txt1").text  = ContMgr.getCont("uilayer_a3_auction_15");
            getComponentByPath <Text>("ig_bg1/txt2").text  = ContMgr.getCont("uilayer_a3_auction_16");
            getComponentByPath <Text>("ig_bg1/txt3").text  = ContMgr.getCont("uilayer_a3_auction_17");
            getComponentByPath <Text>("ig_bg1/txt4").text  = ContMgr.getCont("uilayer_a3_auction_18");
            getComponentByPath <Text>("ig_bg1/txt5").text  = ContMgr.getCont("uilayer_a3_auction_19");
            getComponentByPath <Text>("ig_bg1/txt6").text  = ContMgr.getCont("uilayer_a3_auction_20");
            getComponentByPath <Text>("ig_bg1/txt7").text  = ContMgr.getCont("uilayer_a3_auction_21");
            getComponentByPath <Text>("ig_bg1/txt8").text  = ContMgr.getCont("uilayer_a3_auction_22");
            getComponentByPath <Text>("ig_bg1/txt9").text  = ContMgr.getCont("uilayer_a3_auction_23");
            getComponentByPath <Text>("ig_bg1/txt10").text = ContMgr.getCont("uilayer_a3_auction_24");



            //== 关闭窗口
            instan = this;

            new BaseButton(getTransformByPath("btn_close")).onClick = (GameObject go) =>
            {
                if (a3_ranking.isshow && a3_ranking.isshow.Toback)
                {
                    a3_ranking.isshow.Toback.SetActive(true);
                    if (a3_ranking.isshow.showAvt != null && a3_ranking.isshow.scene_Camera != null)
                    {
                        a3_ranking.isshow.showAvt.SetActive(true);
                        a3_ranking.isshow.scene_Camera.SetActive(true);
                    }
                    a3_ranking.isshow.Toback = null;
                }
                if (PlayerModel.getInstance().showFriend)
                {
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SHEJIAO);
                    PlayerModel.getInstance().showFriend = false;
                }
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_TARGETINFO);
            };
            for (int i = 1; i <= 10; i++)
            {
                icon_ani[i] = this.transform.FindChild("ig_bg1/ain" + i).GetComponent <Image>();
            }
            this.getEventTrigerByPath("avatar_touch").onDrag = OnDrag;
        }
Beispiel #30
0
 private void RefreshMailCnt()
 {
     cnt.text = ContMgr.getCont("mail_cnt", new List <string> {
         A3_MailModel.getInstance().mail_simple.Count.ToString()
     });
 }