Exemplo n.º 1
0
    public void SetAndShowTitle(bool isShow, int titleId)
    {
        if (HeadInfoManager.IsUpdateLockOn)
        {
            return;
        }
        if (this.IsWidgetIsNull())
        {
            return;
        }
        if (isShow && titleId > 0)
        {
            ChengHao chengHao = DataReader <ChengHao> .Get(titleId);

            if (chengHao != null)
            {
                if (chengHao.displayWay == 1)
                {
                    this.SetTitle(chengHao.displayWay, GameDataUtils.GetChineseContent(chengHao.icon, false), null);
                }
                else if (chengHao.displayWay == 2)
                {
                    this.SetTitle(chengHao.displayWay, string.Empty, GameDataUtils.GetIcon(chengHao.icon));
                }
            }
        }
        else
        {
            this.m_lblTitle.set_enabled(false);
            this.m_spTitleBG.set_enabled(false);
            this.m_spTitleIcon.set_enabled(false);
        }
    }
Exemplo n.º 2
0
    public void ShowBuyBtn(bool isShow, Action theBuyBtnCallBack = null, int itemID = 0, long count = 0L)
    {
        this.buyBtnCallBack = theBuyBtnCallBack;
        if (this.GlobalReliveUIBuy.get_activeSelf() != isShow)
        {
            this.GlobalReliveUIBuy.SetActive(isShow);
        }
        if (this.GlobalReliveUIBuy.get_activeSelf())
        {
            if (itemID > 0)
            {
                if (!this.GlobalReliveUIBuyInfo.get_activeSelf())
                {
                    this.GlobalReliveUIBuyInfo.SetActive(true);
                }
                Items items = DataReader <Items> .Get(itemID);

                this.GlobalReliveUIBuyInfoText.set_text(string.Format(GameDataUtils.GetChineseContent(505187, false), count));
                ResourceManager.SetSprite(this.GlobalReliveUIBuyInfoIcon, GameDataUtils.GetIcon(items.icon));
            }
            else if (this.GlobalReliveUIBuyInfo.get_activeSelf())
            {
                this.GlobalReliveUIBuyInfo.SetActive(false);
            }
        }
        this.UpdateBtnPosition();
    }
Exemplo n.º 3
0
 private void SetItemsOfCollab()
 {
     this.mCollabPool.Create(MemCollabManager.Instance.CardIndexs.get_Count(), delegate(int index)
     {
         if (index < MemCollabManager.Instance.CardIndexs.get_Count() && index < this.mCollabPool.Items.get_Count())
         {
             MemCollabItem component = this.mCollabPool.Items.get_Item(index).GetComponent <MemCollabItem>();
             component.index         = index;
             if (MemCollabManager.Instance.SuccessIndexs.Contains(index))
             {
                 component.SetHide();
             }
             else
             {
                 component.SetBack();
             }
             int key = MemCollabManager.Instance.CardIndexs.get_Item(index);
             ChongWuLianLianKan chongWuLianLianKan = DataReader <ChongWuLianLianKan> .Get(key);
             if (chongWuLianLianKan != null)
             {
                 component.SetIcon(GameDataUtils.GetIcon(chongWuLianLianKan.picture));
             }
         }
     });
 }
Exemplo n.º 4
0
    public void ShowAccessChannels(int itemId, Action closeCallback = null)
    {
        this._ActionClose = closeCallback;
        this.AccessChannelUIItems.Clear();
        Items items = DataReader <Items> .Get(itemId);

        if (items == null)
        {
            return;
        }
        this.ItemIcon   = GameDataUtils.GetIcon(items.icon);
        this.ItemIconBg = GameDataUtils.GetItemFrame(items.id);
        this.ItemName   = GameDataUtils.GetItemName(items, true);
        List <int> getType = items.getType;

        for (int i = 0; i < getType.get_Count(); i++)
        {
            ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(getType.get_Item(i));

            if (zhuXianPeiZhi != null)
            {
                OOAccessChannelUIItem o = new OOAccessChannelUIItem
                {
                    InstanceId = getType.get_Item(i),
                    Icon       = ResourceManager.GetIconSprite("i32300_s"),
                    Title      = GameDataUtils.GetChineseContent(zhuXianPeiZhi.name, false),
                    TitleDesc  = TextColorMgr.GetColor(GameDataUtils.GetChineseContent(DataReader <ZhuXianZhangJiePeiZhi> .Get(zhuXianPeiZhi.chapterId).chapterName, false), "fefedc", string.Empty)
                };
                this.AccessChannelUIItems.Add(o);
            }
        }
    }
Exemplo n.º 5
0
    private void UpdateBtnInfo()
    {
        LuckDrawManager.Instance.lastSelectMode = 5;
        int lastSelectMode = LuckDrawManager.Instance.lastSelectMode;
        ChouJiangXiaoHao chouJiangXiaoHao = DataReader <ChouJiangXiaoHao> .Get(LuckDrawManager.Instance.lastSelectMode);

        ChouJiangXiaoHao chouJiangXiaoHao2 = DataReader <ChouJiangXiaoHao> .Get(LuckDrawManager.Instance.lastSelectMode + 1);

        if (BackpackManager.Instance.OnGetGoodCount(chouJiangXiaoHao.lotteryId) >= (long)chouJiangXiaoHao.lotteryAmount || lastSelectMode == 1)
        {
            this.LuckyNum1.set_text(BackpackManager.Instance.OnGetGoodCount(chouJiangXiaoHao.lotteryId) + "/" + chouJiangXiaoHao.lotteryAmount);
            ResourceManager.SetSprite(this.LuckyItemIcon1, GameDataUtils.GetIcon(DataReader <Items> .Get(chouJiangXiaoHao.lotteryId).littleIcon));
        }
        else
        {
            this.LuckyNum1.set_text("x" + chouJiangXiaoHao.amount.ToString());
            ResourceManager.SetSprite(this.LuckyItemIcon1, GameDataUtils.GetIcon(DataReader <Items> .Get(chouJiangXiaoHao.itemId).littleIcon));
        }
        if (lastSelectMode == 1 || (chouJiangXiaoHao2.lotteryId > 0 && BackpackManager.Instance.OnGetGoodCount(chouJiangXiaoHao2.lotteryId) >= (long)chouJiangXiaoHao2.lotteryAmount))
        {
            this.LuckyNum10.set_text(BackpackManager.Instance.OnGetGoodCount(chouJiangXiaoHao2.lotteryId) + "/" + chouJiangXiaoHao2.lotteryAmount);
            ResourceManager.SetSprite(this.LuckyItemIcon10, GameDataUtils.GetIcon(DataReader <Items> .Get(chouJiangXiaoHao2.lotteryId).littleIcon));
        }
        else
        {
            this.LuckyNum10.set_text("x" + chouJiangXiaoHao2.amount.ToString());
            ResourceManager.SetSprite(this.LuckyItemIcon10, GameDataUtils.GetIcon(DataReader <Items> .Get(chouJiangXiaoHao2.itemId).littleIcon));
        }
    }
Exemplo n.º 6
0
    public void UpdateData(ProductionInfo info, DateTime time)
    {
        this.time        = time;
        this.uid         = info.uId;
        this.quickenCost = DataReader <XuanShangSheZhi> .Get("quickenCost").num;

        this.quickenTime = DataReader <XuanShangSheZhi> .Get("quickenTime").num;

        ShengChanJiDi shengChanJiDi = DataReader <ShengChanJiDi> .Get(info.typeId);

        ResourceManager.SetSprite(this.CoinIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(DataReader <XuanShangSheZhi> .Get("quickenCoinType").num).littleIcon));
        ResourceManager.SetSprite(this.Background, GameDataUtils.GetIcon(shengChanJiDi.baseicon));
        ResourceManager.SetSprite(this.Quality, GameDataUtils.GetIcon(5050 + shengChanJiDi.baseQuality));
        this.Name.set_text(shengChanJiDi.baseName);
        Debug.LogError(string.Concat(new object[]
        {
            "地唯一id:",
            info.uId,
            ",配置id:",
            info.typeId,
            "==========配置的名字:",
            shengChanJiDi.baseName,
            ",配置图片:",
            5050 + shengChanJiDi.baseQuality,
            "===",
            GameDataUtils.GetIcon(5050 + shengChanJiDi.baseQuality)
        }));
        this.OnSecondsPast();
    }
    public void SetUI(MineInfo mineInfo, int index)
    {
        MinePetInfo mpi = ElementInstanceManager.Instance.m_elementCopyLoginPush.minePetInfos.get_Item(index);

        this.m_blockID = mpi.blockId;
        BlockInfo    blockInfo    = ElementInstanceManager.Instance.m_elementCopyLoginPush.activateBlocks.Find((BlockInfo a) => a.blockId == mpi.blockId);
        YKuangJingKu yKuangJingKu = DataReader <YKuangJingKu> .Get(blockInfo.incidentTypeId);

        this.TextMineName.set_text(yKuangJingKu.holdName);
        ResourceManager.SetSprite(this.ImageProduceIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(yKuangJingKu.item.get_Item(0)).icon));
        PetInfo petInfo = PetManager.Instance.GetPetInfo(mpi.petId);
        int     num     = 0;

        this.TextMineTime.set_text(TimeConverter.ChangeSecsToString(ElementInstanceManager.Instance.GetTimeCal(mineInfo.blockId)));
        if (DataReader <Pet> .Get(petInfo.petId).element == yKuangJingKu.petType)
        {
            num = yKuangJingKu.petStar.get_Item(petInfo.star - 1);
        }
        this.TextProduceValue.set_text((mineInfo.debrisInfos == null || mineInfo.debrisInfos.get_Count() <= 0) ? "0" : mineInfo.debrisInfos.get_Item(0).debrisNum.ToString());
        this.TextProduceNum.set_text((yKuangJingKu.itemAddTime.get_Item(0) + num).ToString() + "/小时");
        ResourceManager.SetSprite(this.ImagePetIcon, PetManager.Instance.GetSelfPetIcon(petInfo.petId));
        ResourceManager.SetSprite(this.ImageMine, GameDataUtils.GetIcon(yKuangJingKu.icon));
        if (mineInfo.debrisInfos.get_Count() == 0)
        {
            ImageColorMgr.SetImageColor(this.BtnGet.get_transform().FindChild("Image").GetComponent <Image>(), true);
            this.BtnGet.set_enabled(false);
        }
        else
        {
            ImageColorMgr.SetImageColor(this.BtnGet.get_transform().FindChild("Image").GetComponent <Image>(), false);
            this.BtnGet.set_enabled(true);
        }
    }
Exemplo n.º 8
0
    public void SetItem(int itemID, long num)
    {
        if (DataReader <Items> .Contains(itemID))
        {
            Items items = DataReader <Items> .Get(itemID);

            ResourceManager.SetSprite(this.BattleBackpackItemFrame, GameDataUtils.GetItemFrame(items));
            ResourceManager.SetSprite(this.BattleBackpackItemIcon, GameDataUtils.GetIcon(items.icon));
            this.BattleBackpackItemNum.set_text((num != 0L) ? num.ToString() : string.Empty);
            if (items.step > 0)
            {
                this.BattleBackpackItemStep.SetActive(true);
                this.BattleBackpackItemStepNum.set_text(string.Format(GameDataUtils.GetChineseContent(505023, false), items.step));
            }
            else
            {
                this.BattleBackpackItemStep.SetActive(false);
            }
        }
        else
        {
            ResourceManager.SetCodeSprite(this.BattleBackpackItemFrame, "frame_icon_white");
            ResourceManager.SetCodeSprite(this.BattleBackpackItemIcon, string.Empty);
            this.BattleBackpackItemNum.set_text(string.Empty);
            this.BattleBackpackItemStep.SetActive(false);
        }
    }
Exemplo n.º 9
0
    public void UpdateItem(int item, int num)
    {
        this.dataIt = DataReader <Items> .Get(item);

        ResourceManager.SetSprite(this.goldIcon, GameDataUtils.GetIcon(this.dataIt.icon));
        this.goldNum.set_text(num.ToString());
    }
Exemplo n.º 10
0
    private void SetExpAndGold(List <KeyValuePair <int, long> > specialItems = null)
    {
        int num = 0;

        if (specialItems != null)
        {
            for (int i = 0; i < specialItems.get_Count(); i++)
            {
                if (num < 2)
                {
                    int  key   = specialItems.get_Item(i).get_Key();
                    long value = specialItems.get_Item(i).get_Value();
                    if (key <= 5 && value > 0L)
                    {
                        Items item = BackpackManager.Instance.GetItem(key);
                        if (item != null)
                        {
                            this.expAndGoldList.get_Item(num).get_gameObject().SetActive(true);
                            Image component = this.expAndGoldList.get_Item(num).FindChild("Icon").GetComponent <Image>();
                            ResourceManager.SetSprite(component, GameDataUtils.GetIcon(item.littleIcon));
                            this.expAndGoldList.get_Item(num).FindChild("Num").GetComponent <Text>().set_text(Utils.SwitchChineseNumber(value, 0));
                            num++;
                        }
                    }
                }
            }
        }
        for (int j = num; j < 2; j++)
        {
            this.expAndGoldList.get_Item(j).get_gameObject().SetActive(false);
        }
    }
Exemplo n.º 11
0
    public static SpriteRenderer GetMaterialSprite(int talentId, int talentLv)
    {
        int   materialId = PetEvoGlobal.GetMaterialId(talentId, talentLv);
        Items items      = DataReader <Items> .Get(materialId);

        return(GameDataUtils.GetIcon(items.littleIcon));
    }
Exemplo n.º 12
0
    private void SetAttrCurr(int wingId, bool isActivation)
    {
        int    wingLv     = WingManager.GetWingLv(wingId);
        wingLv wingLvInfo = WingManager.GetWingLvInfo(wingId, wingLv);
        Text   component  = base.get_transform().Find("txtName").GetComponent <Text>();

        component.set_text(TextColorMgr.GetColorByQuality(wingLvInfo.name, wingLvInfo.color));
        Image component2 = this.m_btnIcon.GetComponent <Image>();

        ResourceManager.SetSprite(component2, GameDataUtils.GetIcon(wingLvInfo.icon));
        ImageColorMgr.SetImageColor(component2, !isActivation);
        if (wingLv == 0)
        {
            this.m_attrCurr.Find("txtLv").GetComponent <Text>().set_text("激活后");
        }
        else
        {
            this.m_attrCurr.Find("txtLv").GetComponent <Text>().set_text("Lv." + wingLv);
        }
        Attrs attrs = DataReader <Attrs> .Get(wingLvInfo.templateId);

        for (int i = 0; i < 6; i++)
        {
            if (i < attrs.attrs.get_Count())
            {
                Debug.Log(attrs.attrs.get_Item(i) + "=" + (AttrType)attrs.attrs.get_Item(i));
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).get_gameObject().SetActive(true);
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).GetComponent <Text>().set_text(AttrUtility.GetStandardAddDesc(attrs.attrs.get_Item(i), attrs.values.get_Item(i), "ff7d4b"));
            }
            else
            {
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).get_gameObject().SetActive(false);
            }
        }
    }
Exemplo n.º 13
0
    private void RefreshSystemDesc(int id, Artifact godData)
    {
        SystemOpen systemOpen = DataReader <SystemOpen> .Get(id);

        if (systemOpen != null)
        {
            ResourceManager.SetSprite(this.mSkillIcon, GameDataUtils.GetIcon(systemOpen.icon));
            this.mTxSkillName.set_text(GameDataUtils.GetChineseContent(systemOpen.name, false));
            this.mTxSkillTitle.set_text("系统描述:");
            this.mTxSkillDesc.set_text(GameDataUtils.GetChineseContent(systemOpen.bewrite, false));
            string text = string.Empty;
            if (systemOpen.taskId > 0)
            {
                RenWuPeiZhi renWuPeiZhi = DataReader <RenWuPeiZhi> .Get(systemOpen.taskId);

                if (renWuPeiZhi != null)
                {
                    text = string.Format(GameDataUtils.GetChineseContent(godData.access, false), GameDataUtils.GetChineseContent(renWuPeiZhi.dramaIntroduce, false));
                }
            }
            else if (EntityWorld.Instance.EntSelf.Lv < systemOpen.level)
            {
                text = string.Format("达到等级{0}", systemOpen.level);
            }
            this.mTxGetDesc.set_text(text);
        }
    }
Exemplo n.º 14
0
    public void UpdateData(ProductionInfo info)
    {
        this.Info        = info;
        this.uid         = info.uId;
        this.time        = BountyManager.Instance.ProductionTimeMap.get_Item(this.uid);
        this.quickenCost = DataReader <XuanShangSheZhi> .Get("quickenCost").num;

        this.quickenTime = DataReader <XuanShangSheZhi> .Get("quickenTime").num;

        ShengChanJiDi shengChanJiDi = DataReader <ShengChanJiDi> .Get(info.typeId);

        ResourceManager.SetSprite(this.consumeIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(DataReader <XuanShangSheZhi> .Get("quickenCoinType").num).littleIcon));
        ResourceManager.SetSprite(this.Icon, GameDataUtils.GetIcon(shengChanJiDi.baseicon));
        ResourceManager.SetSprite(this.Quality, GameDataUtils.GetIcon(5050 + shengChanJiDi.baseQuality));
        this.Name.set_text(shengChanJiDi.baseName);
        Debug.LogError(string.Concat(new object[]
        {
            "地唯一id:",
            info.uId,
            ",配置id:",
            info.typeId,
            "==========配置的名字:",
            shengChanJiDi.baseName,
            ",配置图片:",
            5050 + shengChanJiDi.baseQuality,
            "===",
            GameDataUtils.GetIcon(5050 + shengChanJiDi.baseQuality)
        }));
        this.RefreshCountdown();
    }
 internal void SetData(int id, long num)
 {
     this.item = BackpackManager.Instance.GetItem(id);
     ResourceManager.SetSprite(this.icon, GameDataUtils.GetIcon(this.item.icon));
     ResourceManager.SetSprite(this.frame, GameDataUtils.GetItemFrame(this.item.id));
     this.gooNum.set_text(num.ToString());
 }
Exemplo n.º 16
0
    private void RefreshDescPanel(HolyWeaponInfo info)
    {
        if (info != null)
        {
            this.mInfo = info;
            this.mData = DataReader <Artifact> .Get(info.Id);

            GodWeaponManager.Instance.WeaponDict.TryGetValue(this.mInfo.Type, ref this.mCurList);
            if (this.mData != null)
            {
                ResourceManager.SetSprite(this.mImgTitle, ResourceManager.GetIconSprite(this.TITLE_SPR[this.mInfo.Type]));
                if (this.mData.model > 0)
                {
                    this.mImgGodWeapon.get_gameObject().SetActive(true);
                    this.mRawGodWeapon.get_gameObject().SetActive(false);
                    ResourceManager.SetSprite(this.mImgGodWeapon, GameDataUtils.GetIcon(this.mData.model));
                    this.PlaySpine(this.mData.system);
                }
                this.mTxModelName.set_text(GameDataUtils.GetChineseContent(this.mData.name, false));
                this.mTxWeaponName.set_text(GameDataUtils.GetChineseContent(this.mData.name, false));
                this.mTxWeaponDesc.set_text(GameDataUtils.GetChineseContent(this.mData.explain, false));
                this.mBtnChallenge.get_gameObject().SetActive(this.mData.acquisitionMode == 1 && this.mInfo.State == 3);
                this.RefreshBottomPanel(this.mData);
            }
        }
        this.mBtnLeftArrow.get_gameObject().SetActive(this.mIndex > 0);
        this.mBtnRightArrow.get_gameObject().SetActive(this.mIndex < this.mCurList.get_Count() - 1);
    }
Exemplo n.º 17
0
    private void SetMailItems(List <DetailInfo> items, int drawMark)
    {
        this.MailItems.Clear();
        for (int i = 0; i < items.get_Count(); i++)
        {
            DetailInfo  detailInfo  = items.get_Item(i);
            OOItem2Draw oOItem2Draw = new OOItem2Draw();
            Items       items2      = DataReader <Items> .Get(detailInfo.cfgId);

            if (items2 != null)
            {
                oOItem2Draw.ID        = items2.id;
                oOItem2Draw.FrameIcon = GameDataUtils.GetItemFrame(items2.id);
                oOItem2Draw.ItemIcon  = GameDataUtils.GetIcon(items2.icon);
                oOItem2Draw.ItemName  = Utils.GetItemNum(items2.id, detailInfo.num);
            }
            else
            {
                oOItem2Draw.ID       = 0;
                oOItem2Draw.ItemIcon = ResourceManagerBase.GetNullSprite();
                oOItem2Draw.ItemName = string.Empty;
            }
            this.MailItems.Add(oOItem2Draw);
        }
    }
Exemplo n.º 18
0
    private void ChangeBodyImage()
    {
        Vector3           localPosition     = new Vector3(-363f, -73f, 0f);
        int               currentShopId     = TransactionNPCManager.Instance.CurrentShopId;
        NPCShangChengBiao nPCShangChengBiao = DataReader <NPCShangChengBiao> .Get(currentShopId);

        if (nPCShangChengBiao != null)
        {
            int key = nPCShangChengBiao.shopNPC.get_Item(0);
            NPC nPC = DataReader <NPC> .Get(key);

            if (nPC != null && nPC.pic > 0)
            {
                int pic = nPC.pic;
                ResourceManager.SetSprite(this.ImageGril, GameDataUtils.GetIcon(pic));
                base.FindTransform("RawImageGril").get_gameObject().SetActive(true);
                float num = (float)nPCShangChengBiao.deviation;
                localPosition = new Vector3(localPosition.x + num, localPosition.y, 0f);
                base.FindTransform("RawImageGril").get_transform().set_localPosition(localPosition);
                return;
            }
        }
        base.FindTransform("RawImageGril").get_transform().set_localPosition(localPosition);
        base.FindTransform("RawImageGril").get_gameObject().SetActive(false);
    }
Exemplo n.º 19
0
 public void UpdateItem(FZengYibuffPeiZhi config)
 {
     this.buffId = config.id;
     this.m_textCost.set_text("x" + config.price);
     ResourceManager.SetSprite(this.m_imageBuffIcon, GameDataUtils.GetIcon(config.icon));
     ResourceManager.SetSprite(this.m_imageIconCost, GameDataUtils.GetIcon(DataReader <Items> .Get(config.coinType).littleIcon));
 }
Exemplo n.º 20
0
    public void RefreshUI(GuildBriefInfo guildInfo, bool isCanShowJoin = true)
    {
        if (!this.isInit)
        {
            this.InitUI();
        }
        if (guildInfo == null)
        {
            return;
        }
        this.guildBriefInfo = guildInfo;
        this.guildName.set_text(guildInfo.name);
        this.guildNotice.set_text("公告:" + guildInfo.notice);
        base.FindTransform("BtnQueryName").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515032, false));
        GongHuiDengJi gongHuiDengJi = DataReader <GongHuiDengJi> .Get(guildInfo.lv);

        if (gongHuiDengJi == null)
        {
            return;
        }
        this.guildNum.set_text(guildInfo.size + "/" + gongHuiDengJi.member);
        this.guildLv.set_text("Lv" + guildInfo.lv + string.Empty);
        Image component = base.FindTransform("ImageIcon").GetComponent <Image>();

        ResourceManager.SetSprite(component, GameDataUtils.GetIcon(gongHuiDengJi.icon));
        this.SetBtnJoinState(isCanShowJoin);
        this.guildRoleMinLv.set_text(string.Empty);
        if (isCanShowJoin)
        {
            this.guildRoleMinLv.set_text(guildInfo.roleMinLv.ToString() + "级可加入");
            this.RefreshCoolDown(this.guildBriefInfo.guildId, this.guildBriefInfo.applicantCd);
        }
    }
Exemplo n.º 21
0
    private void RefreshUI()
    {
        int num = SpecialFightManager.Instance.CurBuffCount + 1;

        if (num <= DataReader <FZengYibuffPeiZhi> .DataList.get_Count())
        {
            this.mData = DataReader <FZengYibuffPeiZhi> .Get(num);

            if (this.mData != null)
            {
                ResourceManager.SetSprite(this.mBuffIcon, GameDataUtils.GetIcon(this.mData.icon));
                ResourceManager.SetSprite(this.mCoinIcon, GameDataUtils.GetIcon(DataReader <Items> .Get(this.mData.coinType).littleIcon));
                this.mBuffCount.set_text(num.ToString());
                this.mBuffName.set_text(GameDataUtils.GetChineseContent(this.mData.buffName, false));
                this.mBuffEffect.set_text(GameDataUtils.GetChineseContent(this.mData.descId, false));
                this.mTxDesc.set_text(GameDataUtils.GetChineseContent(DataReader <FJingYanFuBenPeiZhi> .Get("buffDescId").num, false));
                this.mTxPrice.set_text("x" + this.mData.price);
            }
            this.mGoConfirmFg.SetActive(true);
        }
        else
        {
            this.mGoConfirmFg.SetActive(false);
        }
    }
Exemplo n.º 22
0
    public void RefreshUI(MemberResume member)
    {
        if (!this.isInit)
        {
            this.InitUI();
        }
        this.UpdateTeamChatTip(null);
        this.m_memberResume = member;
        if (this.m_headIcon != null)
        {
            AvatarModel avatarModel = DataReader <AvatarModel> .Get(DataReader <RoleCreate> .Get((int)member.career).modle);

            ResourceManager.SetSprite(this.m_headIcon, GameDataUtils.GetIcon(avatarModel.icon));
        }
        base.FindTransform("num").GetComponent <Text>().set_text(member.hp + string.Empty);
        base.FindTransform("NameLab").GetComponent <Text>().set_text(member.name);
        base.FindTransform("LevelLab").GetComponent <Text>().set_text("Lv." + member.level.ToString());
        ResourceManager.SetSprite(this.m_spVIPLevel1, GameDataUtils.GetNumIcon10(member.vipLv, NumType.Yellow_light));
        ResourceManager.SetSprite(this.m_spVIPLevel2, GameDataUtils.GetNumIcon1(member.vipLv, NumType.Yellow_light));
        if (member.roleId == TeamBasicManager.Instance.MyTeamData.LeaderID)
        {
            this.m_leaderIcon.get_gameObject().SetActive(true);
        }
        else
        {
            this.m_leaderIcon.get_gameObject().SetActive(false);
        }
        base.FindTransform("InFightingStatusIcon").get_gameObject().SetActive(member.inFighting);
    }
    private void RefreshDes()
    {
        MinePetInfo  minePetInfo  = ElementInstanceManager.Instance.m_elementCopyLoginPush.minePetInfos.Find((MinePetInfo a) => a.blockId == this.blockID);
        BlockInfo    blockInfo    = ElementInstanceManager.Instance.m_elementCopyLoginPush.activateBlocks.Find((BlockInfo a) => a.blockId == this.blockID);
        YKuangJingKu yKuangJingKu = DataReader <YKuangJingKu> .Get(blockInfo.incidentTypeId);

        this.TextMineName.set_text(yKuangJingKu.holdName);
        string text = GameDataUtils.GetChineseContent(502311, false);

        text = text.Replace("{s1}", yKuangJingKu.itemAddTime.get_Item(0).ToString());
        Debug.LogError(string.Concat(new object[]
        {
            ElementInstanceManager.Instance.m_elementCopyLoginPush.minePetInfos.get_Count(),
            "===============",
            this.blockID,
            "============",
            minePetInfo
        }));
        int num = 0;

        if (minePetInfo != null)
        {
            PetInfo petInfo = PetManager.Instance.GetPetInfo(minePetInfo.petId);
            if (DataReader <Pet> .Get(petInfo.petId).element == yKuangJingKu.petType)
            {
                num = yKuangJingKu.petStar.get_Item(petInfo.star - 1);
            }
        }
        this.TextProduce.set_text((yKuangJingKu.itemAddTime.get_Item(0) + num).ToString() + GameDataUtils.GetChineseContent(502318, false));
        Debug.LogError("data.item[0]  " + yKuangJingKu.item.get_Item(0));
        ResourceManager.SetSprite(this.ImageMineProduce, GameDataUtils.GetIcon(DataReader <Items> .Get(yKuangJingKu.item.get_Item(0)).icon));
        ResourceManager.SetSprite(this.ImageMineIcon, GameDataUtils.GetIcon(yKuangJingKu.icon));
    }
Exemplo n.º 24
0
    protected override void InitUI()
    {
        base.InitUI();
        this.m_spVIPLevel1 = base.FindTransform("VIPLevel1").GetComponent <Image>();
        this.m_spVIPLevel2 = base.FindTransform("VIPLevel2").GetComponent <Image>();
        base.FindTransform("BtnCheckInfo").GetComponent <ButtonCustom>().onClickCustom      = new ButtonCustom.VoidDelegateObj(this.OnCheckInfoClicked);
        base.FindTransform("BtnAddFriend").GetComponent <ButtonCustom>().onClickCustom      = new ButtonCustom.VoidDelegateObj(this.OnAddFriendClicked);
        base.FindTransform("BtnPrivateChat").GetComponent <ButtonCustom>().onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnPrivateChatClicked);
        base.FindTransform("BtnInvitationTeam").GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnInvitationTeamClicked);
        base.FindTransform("BtnApplyTeam").GetComponent <ButtonCustom>().onClickCustom      = new ButtonCustom.VoidDelegateObj(this.OnApplyTeamClicked);
        base.FindTransform("BtnAddBlackList").GetComponent <ButtonCustom>().onClickCustom   = new ButtonCustom.VoidDelegateObj(this.OnAddBlackListClicked);
        if (CheckPlayerInfoManager.Instance.SelectEntityParent != null)
        {
            EntityParent selectEntityParent = CheckPlayerInfoManager.Instance.SelectEntityParent;
            Image        component          = base.FindTransform("HeadIcon").GetComponent <Image>();
            if (component != null)
            {
                ZhuanZhiJiChuPeiZhi zhuanZhiJiChuPeiZhi = DataReader <ZhuanZhiJiChuPeiZhi> .Get(selectEntityParent.TypeID);

                if (zhuanZhiJiChuPeiZhi != null)
                {
                    ResourceManager.SetSprite(component, GameDataUtils.GetIcon(zhuanZhiJiChuPeiZhi.jobPic1));
                }
            }
            base.FindTransform("IsOnline").GetComponent <Text>().set_text("在线");
            base.FindTransform("RoleName").GetComponent <Text>().set_text(selectEntityParent.Name);
            base.FindTransform("Lv").GetComponent <Text>().set_text("Lv." + selectEntityParent.Lv);
            base.FindTransform("RoleTypeName").GetComponent <Text>().set_text(UIUtils.GetRoleName(selectEntityParent.TypeID));
            base.FindTransform("FightValue").GetComponent <Text>().set_text(selectEntityParent.Fighting.ToString());
            base.FindTransform("TeamValue").GetComponent <Text>().set_text(selectEntityParent.GuildTitle.ToString());
            ResourceManager.SetSprite(this.m_spVIPLevel2, GameDataUtils.GetNumIcon1(selectEntityParent.VipLv, NumType.Yellow));
        }
        CheckPlayerInfoManager.Instance.IsAfterTeamCreateTeam = false;
    }
Exemplo n.º 25
0
    private void SetGemIcon(int typeId)
    {
        Items items = DataReader <Items> .Get(typeId);

        if (items == null)
        {
            return;
        }
        Image component = this.imgIcon.GetComponent <Image>();

        ResourceManager.SetSprite(component, GameDataUtils.GetItemFrameByColor(items.color));
        Image component2 = this.imgIcon.get_transform().FindChild("imgItem").GetComponent <Image>();

        ResourceManager.SetSprite(component2, GameDataUtils.GetIcon(items.icon));
        Text component3 = this.imgIcon.get_transform().FindChild("texName").GetComponent <Text>();

        component3.set_text(GameDataUtils.GetItemName(items, true));
        Dictionary <string, Color> textColorByQuality = GameDataUtils.GetTextColorByQuality(items.color);

        component3.set_color(textColorByQuality.get_Item("TextColor"));
        this.imgIcon.get_transform().FindChild("texName").GetComponent <Outline>().set_effectColor(textColorByQuality.get_Item("TextOutlineColor"));
        Text component4 = this.imgIcon.get_transform().FindChild("texLv").GetComponent <Text>();

        component4.set_text(string.Empty);
        if (!GemGlobal.IsGemEnoughLv(typeId))
        {
            int roleLvRequire = GemGlobal.GetRoleLvRequire(typeId);
            component4.set_text(string.Format(GameDataUtils.GetChineseContent(509011, false), roleLvRequire));
        }
        base.FindTransform("texDesc").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(items.describeId1, false));
    }
Exemplo n.º 26
0
    protected void AddUpBtns()
    {
        this.UpWays = StrongerManager.Instance.GetLowest3StrongerData();
        for (int i = 0; i < this.UpWays.get_Count(); i++)
        {
            GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("UpBtn");
            instantiate2Prefab.get_transform().SetParent(this.UpBtns.get_transform(), true);
            Transform              transform = instantiate2Prefab.get_transform().FindChild("BtnBg");
            StrongerType           type      = this.UpWays.get_Item(i).Type;
            BianQiangJieMianPeiZhi bianQiangJieMianPeiZhi = DataReader <BianQiangJieMianPeiZhi> .Get((int)type);

            Image component = transform.GetComponent <Image>();
            if (bianQiangJieMianPeiZhi != null && bianQiangJieMianPeiZhi.icon2 > 0)
            {
                ResourceManager.SetSprite(component, GameDataUtils.GetIcon(bianQiangJieMianPeiZhi.icon2));
            }
            component.SetNativeSize();
            if (transform is RectTransform)
            {
                (transform as RectTransform).set_pivot(ConstVector2.ML);
            }
            switch (type)
            {
            case StrongerType.Equip:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnEquipLv);
                break;

            case StrongerType.EquipStrength:
            case StrongerType.EquipStarUp:
            case StrongerType.EquipEnchantment:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnEquipQua);
                break;

            case StrongerType.Gem:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnGemLv);
                break;

            case StrongerType.Wing:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnWing);
                break;

            case StrongerType.PetLevel:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnPetLv);
                break;

            case StrongerType.PetUpgrade:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnPetStar);
                break;

            case StrongerType.GodSoldier:
                instantiate2Prefab.get_transform().GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnGodSoldier);
                break;

            default:
                Debug.Log("There is no exist Upway, ID = " + this.UpType);
                break;
            }
        }
    }
Exemplo n.º 27
0
 public void SetData(int iconID, int titleID, int nameID, string effectText, int descID)
 {
     ResourceManager.SetSprite(this.BattleBuffDetailUIBuffInfoIconFG, GameDataUtils.GetIcon(iconID));
     this.BattleBuffDetailUITitleText.set_text(GameDataUtils.GetChineseContent(titleID, false));
     this.BattleBuffDetailUIBuffInfoName.set_text(GameDataUtils.GetChineseContent(titleID, false));
     this.BattleBuffDetailUIBuffInfoEffectText.set_text(effectText);
     this.BattleBuffDetailUIDescText.set_text(GameDataUtils.GetChineseContent(titleID, false));
 }
Exemplo n.º 28
0
 public static SpriteRenderer GetItemLitterIcon(Items dataItem)
 {
     if (dataItem != null)
     {
         return(GameDataUtils.GetIcon(dataItem.littleIcon));
     }
     return(ResourceManagerBase.GetNullSprite());
 }
Exemplo n.º 29
0
    public void SetUI(MonthSign monthSign, bool haveSign, bool canSign, bool canResign, int day)
    {
        this.monthSignCache = monthSign;
        this.dayindex       = day + 1;
        this.TextDay.set_text(string.Format("第{0}天", this.dayindex.ToString()));
        Items items = DataReader <Items> .Get(monthSign.itemId);

        ResourceManager.SetSprite(this.ImageIcon, GameDataUtils.GetIcon(items.icon));
        this.ImageIcon.SetNativeSize();
        ResourceManager.SetSprite(this.ImageFrame, GameDataUtils.GetItemFrame(items.id));
        if (monthSign.itemNum <= 1)
        {
            this.TextNum.get_gameObject().SetActive(false);
        }
        else
        {
            this.TextNum.get_gameObject().SetActive(true);
            this.TextNum.set_text(monthSign.itemNum.ToString());
        }
        if (monthSign.doubleMinVip != 0)
        {
            this.Vip.get_gameObject().SetActive(true);
            string text = "V" + monthSign.doubleMinVip + GameDataUtils.GetChineseContent(502207, false);
            this.VipText.set_text(text);
        }
        else
        {
            this.Vip.get_gameObject().SetActive(false);
        }
        this.state = MonthSignInChildItem.MonthSignInChildItemState.None;
        this.BtnRewardDetail.set_enabled(true);
        this.ResignIn.get_gameObject().SetActive(false);
        this.ItemSelect.get_gameObject().SetActive(false);
        this.CanSignObj.SetActive(false);
        if (haveSign)
        {
            this.ItemSelect.get_gameObject().SetActive(true);
            this.state = MonthSignInChildItem.MonthSignInChildItemState.HaveSign;
        }
        else if (canSign)
        {
            this.state = MonthSignInChildItem.MonthSignInChildItemState.CanSign;
        }
        else if (canResign)
        {
            this.ResignIn.get_gameObject().SetActive(true);
            this.state = MonthSignInChildItem.MonthSignInChildItemState.CanResign;
        }
        if (canSign)
        {
            this.ShowFx(true);
            this.CanSignObj.SetActive(true);
        }
        else
        {
            this.ShowFx(false);
        }
    }
Exemplo n.º 30
0
    public static BackpackObservableItem GetBackpackObservableItem(Goods good, Action <BackpackObservableItem> action2ClickItem, int mode = 1)
    {
        BackpackObservableItem backpackObservableItem = new BackpackObservableItem();

        if (good != null)
        {
            backpackObservableItem.ItemRootNullOn = false;
            backpackObservableItem.ItemRootOn     = true;
            backpackObservableItem.SetSelectedMode(mode);
            backpackObservableItem.OnClickItemAction = action2ClickItem;
            backpackObservableItem.ItemFlag          = false;
            backpackObservableItem.SetIsSelected(false);
            backpackObservableItem.id          = good.GetLongId();
            backpackObservableItem.ItemId      = good.LocalItem.id;
            backpackObservableItem.ItemIcon    = GameDataUtils.GetIcon(good.LocalItem.icon);
            backpackObservableItem.ItemNum     = BackpackManager.Instance.OnGetGoodCount(good.GetLongId()).ToString();
            backpackObservableItem.ItemStepOn  = (good.GetItem().step > 0);
            backpackObservableItem.ItemStepNum = string.Format(GameDataUtils.GetChineseContent(505023, false), good.GetItem().step);
            bool redPointOn = false;
            if ((good.LocalItem.function == 1 || good.LocalItem.function == 2 || good.LocalItem.function == 3) && good.LocalItem.secondType == 11 && EntityWorld.Instance.EntSelf != null && good.LocalItem.minLv <= EntityWorld.Instance.EntSelf.Lv)
            {
                redPointOn = true;
            }
            backpackObservableItem.RedPointOn     = redPointOn;
            backpackObservableItem.EquipIsBinding = false;
            EquipSimpleInfo equipSimpleInfoByEquipID = EquipGlobal.GetEquipSimpleInfoByEquipID(good.GetLongId());
            if (equipSimpleInfoByEquipID != null && equipSimpleInfoByEquipID.suitId > 0)
            {
                TaoZhuangDuanZhu equipForgeCfgData = EquipGlobal.GetEquipForgeCfgData(equipSimpleInfoByEquipID.equipId);
                if (equipForgeCfgData != null)
                {
                    backpackObservableItem.ItemFrame = ResourceManager.GetIconSprite(equipForgeCfgData.frame);
                }
            }
            if (equipSimpleInfoByEquipID != null)
            {
                backpackObservableItem.EquipIsBinding = equipSimpleInfoByEquipID.binding;
            }
            int excellentCount;
            if (good.GetItem().tab == 2)
            {
                excellentCount = EquipGlobal.GetExcellentAttrsCountByColor(good.GetLongId(), 1f);
            }
            else
            {
                excellentCount = good.GetItem().gogok;
            }
            backpackObservableItem.ExcellentCount = excellentCount;
        }
        else
        {
            backpackObservableItem.ItemRootNullOn = true;
            backpackObservableItem.ItemRootOn     = false;
            backpackObservableItem.SetSelectedMode(mode);
            backpackObservableItem.OnClickItemAction = action2ClickItem;
        }
        return(backpackObservableItem);
    }