void creatrveAward()
        {
            for (int i = 0; i < reward_parent.childCount; i++)
            {
                away[i + 1] = reward_parent.GetChild(i).gameObject;
                int nub = i;
                new BaseButton(reward_parent.GetChild(i).FindChild("this").transform).onClick = (GameObject go) =>
                {
                    getAwardBtnOnClick(nub + 1);
                };
            }
            SXML        x    = XMLMgr.instance.GetSXML("clan");
            List <SXML> xmls = XMLMgr.instance.GetSXMLList("clan.donate_awd");

            foreach (SXML xx in xmls)
            {
                build_award ba = new build_award();
                ba.id           = xx.getInt("id");
                ba.limit_donate = xx.getInt("limit_donate");
                ba.item_id      = xx.GetNode("RewardItem").getInt("item_id");
                ba.item_num     = xx.GetNode("RewardItem").getInt("value");
                dic_away[ba.id] = ba;
                GameObject icon = IconImageMgr.getInstance().createA3ItemIcon((uint)ba.item_id, true, ba.item_num, 1);
                icon.transform.FindChild("iconbor").gameObject.SetActive(false);
                icon.transform.FindChild("wk").gameObject.SetActive(false);
                icon.transform.SetParent(away[ba.id].transform, false);
                icon.transform.SetAsFirstSibling();
                away[ba.id].transform.FindChild("num").GetComponent <Text>().text = ba.limit_donate.ToString();
                new BaseButton(icon.transform).onClick = (GameObject go) =>
                {
                    itemtipOnclick(go, (uint)ba.item_id, ba.item_num);
                };
            }
        }
Exemplo n.º 2
0
        public override void init()
        {
            a3_pet_skin.instan = this;
            this.petmodel      = ModelBase <A3_PetModel> .getInstance();

            this.feedid       = this.petmodel.GetFeedItemTpid();
            this.levelid      = this.petmodel.GetLevelItemTpid();
            this.stageid      = this.petmodel.GetStageItemTpid();
            this.currentLevel = this.petmodel.CurrentLevelConf();
            this.currentStage = this.petmodel.CurrentStageConf();
            this.stagestep    = this.currentStage.getUint("crystal_step");
            BaseButton baseButton = new BaseButton(base.getTransformByPath("exp_con/upgrade"), 1, 1);

            baseButton.onClick = new Action <GameObject>(this.OnUpgrade);
            BaseButton baseButton2 = new BaseButton(base.getTransformByPath("exp_con/onekey"), 1, 1);

            baseButton2.onClick = new Action <GameObject>(this.OnOnekey);
            BaseButton baseButton3 = new BaseButton(base.getTransformByPath("lampoil"), 1, 1);

            baseButton3.onClick = new Action <GameObject>(this.OnFeed);
            BaseButton baseButton4 = new BaseButton(base.getTransformByPath("stage_con/improve"), 1, 1);

            baseButton4.onClick = new Action <GameObject>(this.OnStage);
            BaseButton baseButton5 = new BaseButton(base.getTransformByPath("title/help"), 1, 1);

            baseButton5.onClick = new Action <GameObject>(this.OnHelp);
            BaseButton baseButton6 = new BaseButton(base.getTransformByPath("close"), 1, 1);

            baseButton6.onClick = new Action <GameObject>(this.onclose);
            this.autofeed       = base.getComponentByPath <Toggle>("light_hint/toggle");
            this.autofeed.onValueChanged.AddListener(new UnityAction <bool>(this.OnAutoFeedToggleChange));
            this.autobuy = base.getComponentByPath <Toggle>("light_hint/toggle2");
            this.autobuy.onValueChanged.AddListener(new UnityAction <bool>(this.OnAutoBuyToggleChange));
            this.prefab = base.getGameObjectByPath("att/a3_pet_att");
        }
Exemplo n.º 3
0
        public uint getNeedGoldsByZhuan(int profession, uint zhuan)
        {
            SXML sXML = XMLMgr.instance.GetSXML("carrlvl.carr", "carr==" + profession);
            SXML node = sXML.GetNode("zhuanshen", "zhuan==" + zhuan);

            return((node == null) ? 0u : node.getUint("money_cost"));
        }
Exemplo n.º 4
0
        void Start()
        {
            PlayerModel.getInstance().inSpost = true;
            a3_sportsProxy.getInstance().getTeam_info();
            a3_sportsProxy.getInstance().addEventListener(a3_sportsProxy.EVENT_INFO, OnInfo);
            a3_sportsProxy.getInstance().addEventListener(a3_sportsProxy.EVENT_OWNER_INFO, OnOwner);
            a3_sportsProxy.getInstance().addEventListener(a3_sportsProxy.EVENT_KILL_INFO, Onkill_info);
            a3_sportsProxy.getInstance().addEventListener(a3_sportsProxy.EVENT_KILL_SCE, Onkill);
            a3_sportsProxy.getInstance().addEventListener(a3_sportsProxy.EVENT_HELP_KILL, OnhelpKill);



            SXML Xml = XMLMgr.instance.GetSXML("pointarena.initpoint");

            range = Xml.getInt("range");
            flag_list.Clear();

            for (int i = 1; i <= this.transform.childCount; i++)
            {
                if (this.transform.GetChild(i - 1).gameObject.name == "judian" + i)
                {
                    flag_info flag = new flag_info();
                    flag.flag_idx = i;
                    flag.flag_pos = new Vector3(this.transform.GetChild(i - 1).FindChild("zc_judian").position.x *GameConstant.PIXEL_TRANS_UNITYPOS,
                                                this.transform.GetChild(i - 1).FindChild("zc_judian").position.y *GameConstant.PIXEL_TRANS_UNITYPOS,
                                                this.transform.GetChild(i - 1).FindChild("zc_judian").position.z *GameConstant.PIXEL_TRANS_UNITYPOS
                                                );;
                    flag_list[flag.flag_idx] = flag;
                }
            }
            cj = this.gameObject.GetComponent <change_judian>();
        }
Exemplo n.º 5
0
        void want_to()
        {
            map_x  = 0;
            map_y  = 0;
            map_id = 1;

            SXML        s_xml      = XMLMgr.instance.GetSXML("god_light");
            List <SXML> s_xml_info = s_xml.GetNodeList("player_info");

            if (s_xml_info != null)
            {
                foreach (SXML x in s_xml_info)
                {
                    if (x.getInt("zhuan") < PlayerModel.getInstance().up_lvl)
                    {
                    }
                    else if (x.getInt("zhuan") == PlayerModel.getInstance().up_lvl)
                    {
                        if (x.getInt("lv") > PlayerModel.getInstance().lvl)
                        {
                            break;
                        }
                    }
                    else
                    {
                        break;
                    }
                    map_id = x.getInt("map_id");
                    map_x  = x.getInt("map_x");
                    map_y  = x.getInt("map_y");
                }
            }
        }
Exemplo n.º 6
0
        public void getWeaponUpgradeDataById(int id)
        {
            SXML sXML = XMLMgr.instance.GetSXML("shadow_flare.upgrade_exp", "id==" + id);
            WeaponUpgradeData weaponUpgradeData = default(WeaponUpgradeData);

            weaponUpgradeData.id = id;
            bool flag = sXML != null;

            if (flag)
            {
                weaponUpgradeData.expList = new List <UpgradeLevelData>();
                SXML node  = sXML.GetNode("level", null);
                bool flag2 = node != null;
                if (flag2)
                {
                    do
                    {
                        UpgradeLevelData item = default(UpgradeLevelData);
                        item.id  = node.getInt("id");
                        item.exp = node.getInt("exp");
                        weaponUpgradeData.expList.Add(item);
                    }while (node.nextOne());
                }
            }
            this.upgradeData[weaponUpgradeData.id] = weaponUpgradeData;
        }
Exemplo n.º 7
0
        public A3_SummonModel()
            : base()
        {
            itemsXMl = XMLMgr.instance.GetSXML("callbeast");
            _summons = new Dictionary <uint, a3_BagItemData>();
            var appcost = itemsXMl.GetNode("appraise");

            appraiseCost = appcost.getInt("gold_cost");
            var    feed = itemsXMl.GetNode("feed");
            string io   = feed.getString("itm_order");
            var    ss   = io.Split(',');

            foreach (var v in ss)
            {
                feedexplist.Add(int.Parse(v));
            }
            var    life = itemsXMl.GetNode("life");
            string sm   = life.getString("itm_id");
            var    ssm  = sm.Split(',');

            foreach (var v in ssm)
            {
                feedsmlist.Add(int.Parse(v));
            }

            List <SXML> limitXml = itemsXMl.GetNodeList("limit");

            foreach (SXML s in limitXml)
            {
                limitInfo l = new limitInfo();
                l.topType            = s.getInt("type");
                l.lvl                = s.getInt("lvl");
                limitList[l.topType] = l;
            }
        }
Exemplo n.º 8
0
        public List <ResetLvLAwardData> getAwardListById(uint carr)
        {
            SXML sXML = XMLMgr.instance.GetSXML("carrlvl_item.item", "id==" + carr.ToString());
            bool flag = sXML == null;
            List <ResetLvLAwardData> result;

            if (flag)
            {
                result = null;
            }
            else
            {
                this.resetLvLAwardList = new List <ResetLvLAwardData>();
                this.resetLvLAwardList.Clear();
                List <SXML> nodeList = sXML.GetNodeList("award", null);
                for (int i = 0; i < nodeList.Count; i++)
                {
                    ResetLvLAwardData resetLvLAwardData = new ResetLvLAwardData();
                    resetLvLAwardData.name = nodeList[i].getString("item_name");
                    resetLvLAwardData.icon = nodeList[i].getString("icon_file");
                    this.resetLvLAwardList.Add(resetLvLAwardData);
                }
                result = this.resetLvLAwardList;
            }
            return(result);
        }
Exemplo n.º 9
0
        public void init(ByteArray ba)
        {
            List <string> list = new List <string>();

            ba.position = 0;
            while (ba.bytesAvailable > 4)
            {
                int  num  = ba.readInt();
                bool flag = num == -1;
                if (flag)
                {
                    break;
                }
                string item = ba.readUTF8Bytes(num);
                list.Add(item);
            }
            SXML.lStr = list;
            while (ba.bytesAvailable > 4)
            {
                int  num2  = ba.readInt();
                bool flag2 = num2 == -1;
                if (flag2)
                {
                    break;
                }
                string    key       = SXML.lStr[num2];
                SXML      sXML      = new SXML();
                int       len       = ba.readInt();
                ByteArray byteArray = new ByteArray();
                ba.readBytes(byteArray, ba.position, len);
                sXML.m_root         = byteArray;
                this.m_allConf[key] = sXML;
            }
        }
Exemplo n.º 10
0
        void Refresh(GameEvent e = null)
        {
            Variant v = e.data;

            if (v["grade"] <= 0)
            {
                return;
            }
            top_saiji.text = ContMgr.getCont("di") + v["tour_time"] + ContMgr.getCont("saiji");
            SXML Xml = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + v["grade"]);

            duanwei.text = ContMgr.getCont("duanwei") + Xml.getString("name");
            if (v["grade"] < 10)
            {
                rank.sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_00" + v["grade"]);
            }
            else
            {
                rank.sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_0" + v["grade"]);
            }

            setGift();
            refCount();
            refStar(v["score"]);
            reffind();
        }
Exemplo n.º 11
0
        public override void init()
        {
            maploading.instance = this;
            Sprite[] collection = Resources.LoadAll <Sprite>("loading");
            this.bglist.AddRange(collection);
            this.go_info = base.transform.FindChild("info").gameObject;
            this.go_info.SetActive(true);
            this.loadingtext = base.getTransformByPath("info/loadingBar/Text").GetComponent <Text>();
            this.loadingMc   = base.getTransformByPath("info/loadingBar").GetComponent <Image>();
            this.bgimage     = base.transform.FindChild("info/bg_r").GetComponent <Image>();
            bool flag = Baselayer.cemaraRectTran == null;

            if (flag)
            {
                Baselayer.cemaraRectTran = GameObject.Find("Canvas_overlay").GetComponent <RectTransform>();
            }
            RectTransform cemaraRectTran = Baselayer.cemaraRectTran;
            RectTransform component      = base.getTransformByPath("info/bg_r").GetComponent <RectTransform>();

            component.sizeDelta = new Vector2(cemaraRectTran.rect.width, cemaraRectTran.rect.height);
            SXML        sXML     = XMLMgr.instance.GetSXML("tips", "");
            List <SXML> nodeList = sXML.GetNodeList("t", "");

            foreach (SXML current in nodeList)
            {
                string @string = current.getString("info");
                this.tips.Add(@string);
            }
            this.tiptext = base.getComponentByPath <Text>("info/tip/bg/text");
            base.gameObject.SetActive(true);
            base.transform.localScale = base.transform.localScale;
        }
Exemplo n.º 12
0
        public void refStar(int Count)
        {
            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("info/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 < Count; j++)
            {
                star.GetChild(j).FindChild("this").gameObject.SetActive(true);
            }
        }
Exemplo n.º 13
0
        public void SetLegionBuff(int lvl)
        {
            bool flag = this.myLegionbuff.buffs != null;

            if (flag)
            {
                this.myLegionbuff.buffs.Clear();
            }
            SXML        node = this.itemsXMl.GetNode("clan_buff", "lvl==" + lvl);
            List <SXML> list = (node != null) ? node.GetNodeList("buff", "") : null;

            this.myLegionbuff.buffs = new Dictionary <int, int>();
            foreach (SXML current in list)
            {
                this.myLegionbuff.buffs[current.getInt("att_type")] = current.getInt("att_value");
            }
            this.myLegionbuff.cost_donate = node.getInt("cost_donate");
            this.myLegionbuff.cost_item   = node.getInt("cost_item");
            this.myLegionbuff.cost_num    = node.getInt("cost_num");
            bool flag2 = lvl < 12;

            if (flag2)
            {
                this.SetLegionBuff_cost(lvl + 1);
            }
        }
Exemplo n.º 14
0
        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));
                };
            }
        }
Exemplo n.º 15
0
        public void removeOtherBuff(BaseRole role, uint id)
        {
            SXML xml = XMLMgr.instance.GetSXML("skill.state", "id==" + id);

            if (xml != null)
            {
                SXML xml_node = xml.GetNode("s", null);
                if (xml_node != null)
                {
                    switch (xml_node.getInt("tp"))
                    {
                    case 7:
                        role.m_curAni.enabled = true;
                        break;
                    }
                }
            }

            if (role is P3Mage || role is ohterP3Mage)
            {
                //法师盾的buffid
                if (xml.getInt("skill_id") == 3008)
                {
                    SelfRole._inst.PlaySkill(30081);
                }
            }
        }
Exemplo n.º 16
0
        private GameObject createAssassinAvatar_mon(int tpid)
        {
            SXML       sXML       = XMLMgr.instance.GetSXML("callbeast", "");
            SXML       node       = sXML.GetNode("callbeast", "id==" + tpid);
            int        @int       = node.getInt("mid");
            SXML       sXML2      = XMLMgr.instance.GetSXML("monsters.monsters", "id==" + @int);
            int        int2       = sXML2.getInt("obj");
            GameObject original   = Resources.Load <GameObject>("monster/" + int2);
            GameObject gameObject = UnityEngine.Object.Instantiate(original, new Vector3(this.standPoint.transform.position.x - 1.4f, this.standPoint.transform.position.y, this.standPoint.transform.position.z - 1f), Quaternion.identity) as GameObject;

            Transform[] componentsInChildren = gameObject.GetComponentsInChildren <Transform>();
            for (int i = 0; i < componentsInChildren.Length; i++)
            {
                Transform transform = componentsInChildren[i];
                transform.gameObject.layer = EnumLayer.LM_FX;
            }
            Transform transform2 = gameObject.transform.FindChild("model");
            Animator  component  = transform2.GetComponent <Animator>();

            component.cullingMode = AnimatorCullingMode.AlwaysAnimate;
            transform2.gameObject.AddComponent <Summon_Base_Event>();
            transform2.Rotate(Vector3.up, (float)(90 - sXML2.getInt("smshow_face")));
            transform2.transform.localScale = new Vector3(0.7f, 0.7f, 0.7f);
            return(gameObject);
        }
Exemplo n.º 17
0
        public void addData(WeaponData one)
        {
            SXML sXML = XMLMgr.instance.GetSXML("shadow_flare.shadow_flare", "id==" + one.id);
            bool flag = sXML != null;

            if (flag)
            {
                one.name      = sXML.getString("name");
                one.attrId    = sXML.getInt("attrId");
                one.levelList = new List <WeaponLevelData>();
                SXML node  = sXML.GetNode("level", null);
                bool flag2 = node != null;
                if (flag2)
                {
                    do
                    {
                        WeaponLevelData item = default(WeaponLevelData);
                        item.id  = node.getString("id");
                        item.que = node.getString("que");
                        one.levelList.Add(item);
                    }while (node.nextOne());
                }
            }
            this.weaponFace.Add(one.id, one);
        }
Exemplo n.º 18
0
        private void GetChaEqpInfo(Variant chaInfo, int tp, out int id, out int intens)
        {
            id     = 0;
            intens = 0;
            bool flag = chaInfo == null;

            if (!flag)
            {
                Variant variant = chaInfo["eqp"];
                bool    flag2   = variant == null;
                if (!flag2)
                {
                    bool flag3 = this.itemXML == null;
                    if (flag3)
                    {
                        this.itemXML = XMLMgr.instance.GetSXML("item", "");
                    }
                    foreach (Variant current in variant._arr)
                    {
                        int  num   = current["tpid"];
                        int  num2  = current["stag"];
                        int  @int  = this.itemXML.GetNode("item", "id==" + num).getInt("equip_type");
                        bool flag4 = @int == tp;
                        if (flag4)
                        {
                            id     = num;
                            intens = num2;
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 19
0
        public void add(int type, int tpyeid, int id)
        {
            List <string> lstr   = new List <string>();
            SXML          ncpxml = XMLMgr.instance.GetSXML("newbie_fb");
            SXML          xml    = ncpxml.GetNode("newbie", "id==" + tpyeid);

            if (xml != null)
            {
                List <SXML> l = new List <SXML>();
                if (type == 1)
                {
                    l = xml.GetNodeList("waitcode");
                }
                else
                {
                    l = xml.GetNodeList("code");
                }
                foreach (SXML s in l)
                {
                    lstr.Add(s.getString("value"));
                }
            }
            NewbieQueItem item = new NewbieQueItem(lstr, id);

            lQue.Add(item);
        }
Exemplo n.º 20
0
 public override void onClosed()
 {
     this.async      = null;
     this.standPoint = null;
     this.itemXML    = null;
     this.disposeAvatar();
 }
Exemplo n.º 21
0
        private bool isFashion(int id)
        {
            SXML itemXMl = XMLMgr.instance.GetSXML("item");;

            if (itemXMl == null)
            {
                return(false);
            }
            SXML itemNode = itemXMl.GetNode("item", "id==" + id);

            if (itemNode == null)
            {
                return(false);
            }
            int type = itemNode.getInt("equip_type");

            if (type == 11 || type == 12)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 22
0
        public void removeOtherBuff(BaseRole role, uint id)
        {
            SXML sXML = XMLMgr.instance.GetSXML("skill.state", "id==" + id);
            bool flag = sXML != null;

            if (flag)
            {
                SXML node  = sXML.GetNode("s", null);
                bool flag2 = node != null;
                if (flag2)
                {
                    int @int = node.getInt("tp");
                    if (@int == 7)
                    {
                        role.m_curAni.enabled = true;
                    }
                }
            }
            bool flag3 = role is P3Mage || role is ohterP3Mage;

            if (flag3)
            {
                bool flag4 = sXML.getInt("skill_id") == 3008;
                if (flag4)
                {
                    SelfRole._inst.PlaySkill(30081);
                }
            }
        }
Exemplo n.º 23
0
        //切换tab
        void ref_topText()
        {
            transform.FindChild("tab_01/God/help_text").gameObject.SetActive(false);
            transform.FindChild("tab_01/per/help_text").gameObject.SetActive(false);
            if (index == 0)
            {
                //this.transform.FindChild("tab_01/top").GetComponent<Text>().text = "神王遗物";
                this.transform.FindChild("tab_01/per").gameObject.SetActive(false);
                this.transform.FindChild("tab_01/God").gameObject.SetActive(true);
                isthis.SetActive(true);
                isthis.transform.SetParent(this.transform.FindChild("btn/God_btn"), false);
                isthis.transform.localPosition = Vector2.zero;
            }
            else if (index == 1)
            {
                //this.transform.FindChild("tab_01/top").GetComponent<Text>().text = "人王遗物";
                this.transform.FindChild("tab_01/per").gameObject.SetActive(true);
                this.transform.FindChild("tab_01/God").gameObject.SetActive(false);
                isthis.SetActive(true);
                isthis.transform.SetParent(this.transform.FindChild("btn/per_btn"), false);
                isthis.transform.localPosition = Vector2.zero;
            }
            disboosAvatar();
            SXML  x      = XMLMgr.instance.GetSXML("accent_relic.mod", "type==" + (index + 1));
            int   bossid = x.getInt("id");
            float size   = x.getFloat("scale");

            createAvatar_body(bossid, size);
        }
Exemplo n.º 24
0
        //像服务器发送请求
        int vip_lite(int type)
        {
            SXML _xml = OffLineModel.getInstance().OffLineXML.GetNode("rate_type", "type==" + type.ToString());
            int  vip  = _xml.getInt("vip_level");

            return(vip);
        }
Exemplo n.º 25
0
        private void OnStageChange()
        {
            this.currentStage = this.petmodel.CurrentStageConf();
            this.stagestep    = this.currentStage.getUint("crystal_step");
            Text componentByPath = base.getComponentByPath <Text>("stage");

            componentByPath.text = "(" + this.petmodel.Stage.ToString() + "转)";
            Text componentByPath2 = base.getComponentByPath <Text>("name");

            componentByPath2.text = this.petmodel.CurrentStageConf().getString("name");
            Text componentByPath3 = base.getComponentByPath <Text>("stage_con/gold/text");

            componentByPath3.text = this.currentStage.getString("gold_cost");
            Text componentByPath4 = base.getComponentByPath <Text>("exp_con/upgrade/text");
            uint @uint            = this.currentStage.getUint("crystal");
            int  itemNumByTpid    = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.stageid);

            string arg_ED_0 = ((ulong)@uint <= (ulong)((long)itemNumByTpid)) ? "<color=#00ffff>" : "<color=#ff0000>";

            componentByPath4.text = @uint.ToString();
            Text componentByPath5 = base.getComponentByPath <Text>("stage_con/rate");
            uint num = this.currentStage.getUint("rate") / 100u;

            componentByPath5.text = ContMgr.getCont("pet_succ", new List <string>
            {
                num.ToString()
            });
            this.CheckShowLevelOrStage();
            this.RefreshAvatar();
        }
Exemplo n.º 26
0
        //!--获取当前阶段配置
        public SXML CurrentStageConf()
        {
            SXML idXML    = PetXML.GetNode("pet", "id==" + Tpid);
            SXML stageXML = idXML?.GetNode("stage", "stage==" + Stage);

            return(stageXML);
        }
Exemplo n.º 27
0
        void creatrve(int thisday)
        {
            for (int j = 0; j < objs.Length; j++)
            {
                objs[j].SetActive(j == thisday - 1 ? true : false);
            }

            SXML x = XMLMgr.instance.GetSXML("welfare.daily_gift");

            des.text   = x.GetNode("gift", "id==" + thisday).getString("note");
            price.text = x.GetNode("gift", "id==" + thisday).getString("yb");



            List <SXML> lst = XMLMgr.instance.GetSXML("welfare.daily_gift").GetNode("gift", "id==" + thisday).GetNodeList("item");



            foreach (SXML s in lst)
            {
                GameObject clone = GameObject.Instantiate(image) as GameObject;
                clone.SetActive(true);
                clone.transform.SetParent(contain.transform, false);
                uint       item_id = s.getUint("id");
                GameObject go      = IconImageMgr.getInstance().createA3ItemIcon(item_id, false, -1, 1, true);
                go.transform.SetParent(clone.transform.FindChild("icon").transform, false);
                clone.transform.FindChild("name/Text").GetComponent <Text>().text = s.getString("name");
                new BaseButton(go.transform).onClick = (GameObject gos) =>
                {
                    showtip(item_id);
                };
            }
            a3_runestone.commonScroview(contain, lst.Count);
        }
Exemplo n.º 28
0
        void onExchange(GameObject go)
        {
            ExchangeModel exModel = ExchangeModel.getInstance();
            SXML          xml     = XMLMgr.instance.GetSXML("acution.exchange");

            diamand = xml.getInt("initial");
            if (PlayerModel.getInstance().gold < diamand * (exModel.Count + 1))
            {
                flytxt.instance.fly(ContMgr.getCont("a3_exchange_nozs"));
                return;
            }



            int num;

            if (A3_VipModel.getInstance().Level > 0)
            {
                num = A3_VipModel.getInstance().vip_exchange_num(3);
            }
            else
            {
                num = 10;
            }

            if ((num - exModel.Count) <= 0)
            {
                flytxt.instance.fly(ContMgr.getCont("a3_exchange_yj"));
                return;
            }

            ExchangeProxy exProxy = ExchangeProxy.getInstance();

            exProxy.Exchange();
        }
Exemplo n.º 29
0
        void SetPrepareCon()
        {
            SXML        Xml      = XMLMgr.instance.GetSXML("clanwar");
            List <SXML> def_list = Xml.GetNodeList("def_info");
            GameObject  item     = this.transform.FindChild("viewbg/Prepareview/scroll/item").gameObject;
            Transform   defCon   = this.transform.FindChild("viewbg/Prepareview/scroll/content");

            for (int i = 0; i < defCon.childCount; i++)
            {
                Destroy(defCon.GetChild(i).gameObject);
            }
            def_objList.Clear();
            foreach (SXML one in def_list)
            {
                GameObject clon = Instantiate(item) as GameObject;
                clon.SetActive(true);
                clon.transform.SetParent(defCon, false);
                clon.transform.FindChild("name").GetComponent <Text>().text = one.getString("name");
                clon.transform.FindChild("this").gameObject.SetActive(false);
                def_objList[one.getInt("id")] = clon;
                int id = one.getInt("id");
                new BaseButton(clon.transform).onClick = (GameObject go) => {
                    change_Id(id);
                };
            }
        }
Exemplo n.º 30
0
        public A3_SummonModel()
        {
            this.itemsXMl = XMLMgr.instance.GetSXML("callbeast", "");
            this._summons = new Dictionary <uint, a3_BagItemData>();
            SXML node = this.itemsXMl.GetNode("appraise", "");

            this.appraiseCost = node.getInt("gold_cost");
            SXML   node2   = this.itemsXMl.GetNode("feed", "");
            string @string = node2.getString("itm_order");

            string[] array = @string.Split(new char[]
            {
                ','
            });
            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string s = array2[i];
                this.feedexplist.Add(int.Parse(s));
            }
            SXML   node3   = this.itemsXMl.GetNode("life", "");
            string string2 = node3.getString("itm_id");

            string[] array3 = string2.Split(new char[]
            {
                ','
            });
            string[] array4 = array3;
            for (int j = 0; j < array4.Length; j++)
            {
                string s2 = array4[j];
                this.feedsmlist.Add(int.Parse(s2));
            }
        }