Пример #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);
    }
Пример #2
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;
    }
Пример #3
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;
    }
Пример #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));
     }
 }
Пример #5
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);
     }
 }
Пример #6
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);
     }
 }
Пример #7
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()
     });
 }
Пример #8
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();
    }
Пример #9
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);
         }
     }
 }
Пример #10
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));
    }
Пример #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));
 }