Exemplo n.º 1
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);
    }
Exemplo n.º 2
0
    public void OpenTreasure(int vipLevel, VipXiaoGuo dataVIPEffect)
    {
        if (!TreasureUIViewModel.IsTreasureValid(vipLevel, dataVIPEffect))
        {
            TreasureUIView.Instance.Show(false);
            return;
        }
        UIManagerControl.Instance.OpenUI("TreasureUI", UINodesManager.NormalUIRoot, false, UIType.NonPush);
        this.ObatinItems.Clear();
        this.SpecialItemText = string.Empty;
        this.VIPEffect       = dataVIPEffect;
        this.VIPLevel10      = GameDataUtils.GetNumIcon10(vipLevel, NumType.Yellow_light);
        this.VIPLevel1       = GameDataUtils.GetNumIcon1(vipLevel, NumType.Yellow_light);
        this.BtnOKText       = GameDataUtils.GetChineseContent(508009, false);
        if (dataVIPEffect.value2 > 0 && dataVIPEffect.value3 > 0)
        {
            this.ConsumeOn   = true;
            this.ConsumeIcon = GameDataUtils.GetItemIcon(dataVIPEffect.value2);
            this.ConsumeNum  = dataVIPEffect.value3.ToString();
        }
        else
        {
            this.ConsumeOn = false;
        }
        string text = string.Empty;
        List <VipBoxItemInfo> vIPBox = VIPManager.Instance.GetVIPBox(dataVIPEffect.effect);

        if (vIPBox != null)
        {
            for (int i = 0; i < vIPBox.get_Count(); i++)
            {
                VipBoxItemInfo vipBoxItemInfo = vIPBox.get_Item(i);
                if (SpecialItem.IsSpecial(vipBoxItemInfo.itemId))
                {
                    string colorByID = TextColorMgr.GetColorByID("x" + vipBoxItemInfo.itemCount, 405);
                    if (string.IsNullOrEmpty(text))
                    {
                        text = GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID;
                    }
                    else
                    {
                        text = text + ", " + GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID;
                    }
                }
                else
                {
                    OOItem2Draw oOItem2Draw = new OOItem2Draw();
                    oOItem2Draw.ID       = vipBoxItemInfo.itemId;
                    oOItem2Draw.ItemIcon = GameDataUtils.GetItemIcon(vipBoxItemInfo.itemId);
                    oOItem2Draw.ItemName = Utils.GetItemNum(vipBoxItemInfo.itemId, (long)vipBoxItemInfo.itemCount);
                    this.ObatinItems.Add(oOItem2Draw);
                }
            }
        }
        this.SpecialItemText = text;
    }
Exemplo n.º 3
0
 protected override void SetVIP(int level)
 {
     if (this.ShowVIP(level))
     {
         base.FindTransform("VIP").get_gameObject().SetActive(true);
         ResourceManager.SetSprite(this.m_spVIPLevel10, GameDataUtils.GetNumIcon10(level, NumType.Yellow_light));
         ResourceManager.SetSprite(this.m_spVIPLevel1, GameDataUtils.GetNumIcon1(level, NumType.Yellow_light));
     }
     else
     {
         base.FindTransform("VIP").get_gameObject().SetActive(false);
     }
 }
Exemplo n.º 4
0
 public void SetPlayerVipLv(int vipLevel)
 {
     if (vipLevel == 0)
     {
         this.TeamMemberVIP.SetActive(false);
     }
     else
     {
         this.TeamMemberVIP.SetActive(true);
         ResourceManager.SetSprite(this.TeamMemberVIPLevel10, GameDataUtils.GetNumIcon10(vipLevel, NumType.Yellow_light));
         ResourceManager.SetSprite(this.TeamMemberVIPLevel1, GameDataUtils.GetNumIcon1(vipLevel, NumType.Yellow_light));
     }
 }
Exemplo n.º 5
0
 public void UpdateRow(InviteData row)
 {
     if (row.role != null)
     {
         this.role = row;
         Image component = base.FindTransform("headIcon").GetComponent <Image>();
         ResourceManager.SetSprite(component, UIUtils.GetRoleSmallIcon((int)row.role.career));
         base.FindTransform("roleName").GetComponent <Text>().set_text(this.role.role.name);
         base.FindTransform("fightValue").GetComponent <Text>().set_text(string.Empty + this.role.role.fighting.ToString());
         base.FindTransform("level").GetComponent <Text>().set_text("Lv" + this.role.role.level.ToString());
         ResourceManager.SetSprite(this.m_spVIPLevel1, GameDataUtils.GetNumIcon10(row.role.vipLv, NumType.Yellow));
         ResourceManager.SetSprite(this.m_spVIPLevel2, GameDataUtils.GetNumIcon1(row.role.vipLv, NumType.Yellow));
         this.InitCdTime(this.role.cdTime);
     }
 }
Exemplo n.º 6
0
 private OOFriendInfoUnit CreateFriendInfoUnit(OOFriendInfoUnit.UnitType status, BuddyInfo sdata, bool isSendRecommdReq = false)
 {
     return(new OOFriendInfoUnit
     {
         UnitStatus = status,
         FriendUID = sdata.id,
         FriendIcon = UIUtils.GetRoleSmallIcon(sdata.career),
         FriendName = sdata.name,
         OffLineStatus = sdata.online,
         IsFriendRecommend = isSendRecommdReq,
         VIPLevel1 = GameDataUtils.GetNumIcon10(sdata.vipLv, NumType.Yellow_light),
         VIPLevel2 = GameDataUtils.GetNumIcon1(sdata.vipLv, NumType.Yellow_light),
         Level = "Lv." + sdata.lv,
         BattlePower = sdata.fighting.ToString()
     });
 }
Exemplo n.º 7
0
    public void SetVIPlv(int vipLv)
    {
        int vipLv2 = EntityWorld.Instance.EntSelf.VipLv;

        if (vipLv != vipLv2 && vipLv < vipLv2)
        {
            ResourceManager.SetSprite(this.vip1L, GameDataUtils.GetNumIcon10(vipLv, NumType.Yellow_big));
            this.vip1L.SetNativeSize();
            ResourceManager.SetSprite(this.vip10L, GameDataUtils.GetNumIcon1(vipLv, NumType.Yellow_big));
            this.vip10L.SetNativeSize();
            ResourceManager.SetSprite(this.vip1R, GameDataUtils.GetNumIcon10(vipLv2, NumType.Yellow_big));
            this.vip1R.SetNativeSize();
            ResourceManager.SetSprite(this.vip10R, GameDataUtils.GetNumIcon1(vipLv2, NumType.Yellow_big));
            this.vip10R.SetNativeSize();
        }
        this.AddFX();
    }
Exemplo n.º 8
0
 private void RefreshRoom()
 {
     if (this.Info != null)
     {
         ResourceManager.SetSprite(this.mImgIcon, UIUtils.GetRoleSmallIcon(this.Info.career));
         this.mTxName.set_text(this.Info.name);
         this.mTxLevel.set_text("Lv" + this.Info.lv);
         this.mTxPower.set_text(this.Info.fighting.ToString());
         ResourceManager.SetSprite(this.mImgVipLv1, GameDataUtils.GetNumIcon10(this.Info.vipLv, NumType.Yellow_light));
         ResourceManager.SetSprite(this.mImgVipLv2, GameDataUtils.GetNumIcon1(this.Info.vipLv, NumType.Yellow_light));
         if (this.Info.lv > this.mMaxLevel)
         {
             this.mBtnInvite.get_gameObject().SetActive(false);
             this.mImgTips.get_gameObject().SetActive(true);
             this.mTxTips.get_gameObject().SetActive(false);
             ResourceManager.SetSprite(this.mImgTips, ResourceManager.GetIconSprite("hs_djgg"));
         }
         else if (this.Info.lv < this.mMinLevel)
         {
             this.mBtnInvite.get_gameObject().SetActive(false);
             this.mImgTips.get_gameObject().SetActive(true);
             this.mTxTips.get_gameObject().SetActive(false);
             ResourceManager.SetSprite(this.mImgTips, ResourceManager.GetIconSprite("hs_djgd"));
         }
         else if (this.ProtectTimes == 0)
         {
             this.mBtnInvite.get_gameObject().SetActive(false);
             this.mImgTips.get_gameObject().SetActive(true);
             this.mTxTips.get_gameObject().SetActive(false);
             ResourceManager.SetSprite(this.mImgTips, ResourceManager.GetIconSprite("hs_csbz"));
         }
         else if (this.ProtectTimes == -1)
         {
             this.mBtnInvite.get_gameObject().SetActive(false);
             this.mImgTips.get_gameObject().SetActive(false);
             this.mTxTips.get_gameObject().SetActive(true);
         }
         else
         {
             this.mBtnInvite.get_gameObject().SetActive(true);
             this.mImgTips.get_gameObject().SetActive(false);
             this.mTxTips.get_gameObject().SetActive(false);
         }
     }
 }
Exemplo n.º 9
0
    public void RefreshUI(MemberResume memberInfo)
    {
        this.memberInfo = memberInfo;
        if (memberInfo == null)
        {
            return;
        }
        int  vipLv    = memberInfo.vipLv;
        long fighting = memberInfo.fighting;
        int  level    = memberInfo.level;

        base.FindTransform("level").GetComponent <Text>().set_text(level.ToString());
        base.FindTransform("name").GetComponent <Text>().set_text(memberInfo.name.ToString());
        base.FindTransform("fighting").GetComponent <Text>().set_text(fighting.ToString());
        Image component  = base.FindTransform("VIPLevel1").GetComponent <Image>();
        Image component2 = base.FindTransform("VIPLevel2").GetComponent <Image>();

        ResourceManager.SetSprite(component, GameDataUtils.GetNumIcon10(memberInfo.vipLv, NumType.Yellow_light));
        ResourceManager.SetSprite(component2, GameDataUtils.GetNumIcon1(memberInfo.vipLv, NumType.Yellow_light));
        ResourceManager.SetSprite(this.m_headIcon, UIUtils.GetRoleSmallIcon((int)memberInfo.career));
    }
Exemplo n.º 10
0
    public void RefreshUI(MemberResume memberResume)
    {
        this.m_memberResume = memberResume;
        if (!this.isInit)
        {
            this.InitUI();
        }
        bool flag = memberResume != null;

        if (this.noMemberObj.get_activeSelf() == flag)
        {
            this.noMemberObj.SetActive(!flag);
        }
        if (this.haveMemberObj.get_activeSelf() != flag)
        {
            this.haveMemberObj.SetActive(flag);
        }
        if (this.m_memberResume != null)
        {
            ResourceManager.SetSprite(this.headIconImg, UIUtils.GetRoleSmallIcon((int)memberResume.career));
            this.roleNameText.set_text(memberResume.name);
            this.roleLvText.set_text("Lv." + memberResume.level + string.Empty);
            this.roleFightingText.set_text(memberResume.fighting + string.Empty);
            if (TeamBasicManager.Instance.MyTeamData != null && TeamBasicManager.Instance.MyTeamData.LeaderID == memberResume.roleId)
            {
                this.leadIconImg.set_enabled(true);
            }
            else
            {
                this.leadIconImg.set_enabled(false);
            }
            ResourceManager.SetSprite(this.m_spVIPLevel1Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light));
            ResourceManager.SetSprite(this.m_spVIPLevel2Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light));
        }
        this.SetButtonVisible();
    }
Exemplo n.º 11
0
 public void SetLevel(int num)
 {
     ResourceManager.SetSprite(this.m_spLevel1, GameDataUtils.GetNumIcon1(num, NumType.jn));
     ResourceManager.SetSprite(this.m_spLevel10, GameDataUtils.GetNumIcon10(num, NumType.jn));
 }