public void UpdateVipPayProgressInfo() { if (m_BaseWndObject == null) { return; } UpdateVipScrollData(); m_VipLevel[0].text = PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel().ToString(); tagVipOnce pVip = null; if (PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel() == 0) { pVip = FishConfig.Instance.m_VipConfig.VipMap[1]; m_VipLevel[1].text = pVip.VipLevel.ToString(); uint needPay = FishConfig.Instance.m_VipConfig.VipMap[pVip.VipLevel].NeedRechatgeRMBSum; m_VipPayProgressLabel.text = string.Format("{0}/{1}", PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum(), needPay); m_VipPayProgressSprite.fillAmount = PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum() * 1.0f / needPay * 1.0f; uint sub = 0; if (needPay >= PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum()) { sub = needPay - PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum(); } m_VipTips.text = string.Format(StringTable.GetString("VIP_Pay_Sum"), sub, pVip.VipLevel); return; } else { pVip = FishConfig.Instance.m_VipConfig.VipMap[PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel()]; } if (pVip.UpperVipLevel == 0) { m_VipLevel[1].text = pVip.VipLevel.ToString(); m_VipPayProgressLabel.text = string.Format("{0}/{1}", PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum(), pVip.NeedRechatgeRMBSum); m_VipPayProgressSprite.fillAmount = 1; m_VipTips.text = StringTable.GetString("VIP_Pay_Sum1"); } else { m_VipLevel[1].text = pVip.UpperVipLevel.ToString(); uint needPay = FishConfig.Instance.m_VipConfig.VipMap[pVip.UpperVipLevel].NeedRechatgeRMBSum; m_VipPayProgressLabel.text = string.Format("{0}/{1}", PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum(), needPay); m_VipPayProgressSprite.fillAmount = PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum() * 1.0f / needPay * 1.0f; uint sub = 0; if (needPay >= PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum()) { sub = needPay - PlayerRole.Instance.RoleInfo.RoleMe.GetTotalRechargeSum(); } m_VipTips.text = string.Format(StringTable.GetString("VIP_Pay_Sum"), sub, pVip.UpperVipLevel); } }
public void ShowVipInfo(tagVipOnce pVipInfo) { m_VipLevel.text = pVipInfo.VipLevel.ToString(); if (pVipInfo.VipLevel >= 5) { m_LaunchIcon.spriteName = "1305"; m_DescLabel[0].text = StringTable.GetString("VIP_Desc_3"); m_DescLabel[1].text = StringTable.GetString("VIP_Desc_4"); return; } //获取炮台类型 byte LaunchType = 0; foreach (KeyValuePair <byte, byte> map in pVipInfo.CurrceyLevel.CanUseLauncher) { LaunchType = map.Key; break; } uint ItemID = LauncherSetting.LauncherDataList[LaunchType].nItemid; if (ItemID != 0 && FishConfig.Instance.m_ItemInfo.m_ItemMap.ContainsKey(ItemID) == false) { return; } tagItemConfig pItem = FishConfig.Instance.m_ItemInfo.m_ItemMap[ItemID]; m_LaunchIcon.spriteName = pItem.ItemIcon; byte Idx = 0; m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe0"), LauncherSetting.LauncherDataList[LaunchType].name); //if (pVipInfo.CurrceyLevel.IsCanLauncherLocking) //{ //} if (LaunchType == 1) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe1")); } if (LauncherSetting.LauncherDataList[LaunchType].nSkillBind != 255) { byte SikllIdx = LauncherSetting.LauncherDataList[LaunchType].nSkillBind; m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe2"), SkillSetting.SkillDataList[SikllIdx].name); } if (pVipInfo.TotalLevel.LauncherReBoundNum > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe3"), pVipInfo.TotalLevel.LauncherReBoundNum); } if (pVipInfo.TotalLevel.AddAlmsSum > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe4"), pVipInfo.TotalLevel.AddAlmsSum); } if (pVipInfo.TotalLevel.AddAlmsRate > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe5"), (1 + (pVipInfo.TotalLevel.AddAlmsRate * 1.0f / 100 * 1.0f))); } if (Idx >= m_DescLabel.Length) { return; } if (pVipInfo.TotalLevel.AddMonthScoreRate > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe6"), pVipInfo.TotalLevel.AddMonthScoreRate); } if (Idx >= m_DescLabel.Length) { return; } if (pVipInfo.TotalLevel.AddUseMedalSum > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe7"), pVipInfo.TotalLevel.AddUseMedalSum); } if (Idx >= m_DescLabel.Length) { return; } if (pVipInfo.TotalLevel.AddReChargeRate > 0) { m_DescLabel[Idx++].text = string.Format(StringTable.GetString("VIP_Privilege_Describe8"), pVipInfo.TotalLevel.AddReChargeRate); } }
public void ShowVipInfo(tagVipOnce pVipInfo) { m_VipLevel.text = pVipInfo.VipLevel.ToString(); m_DescLabel.text = pVipInfo.VipDec; m_PayLabel.text = pVipInfo.VipName; if (PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel() >= pVipInfo.VipLevel) { m_Locked.SetActive(false); } if (pVipInfo.VipLevel >= 5) { m_LaunchIcon.spriteName = "1305"; m_LaunchName.spriteName = "Launch_Name5"; m_DescLabel.text = StringTable.GetString("VIP_Desc_1"); m_PayLabel.text = StringTable.GetString("VIP_Desc_2"); return; } //获取炮台类型 byte LaunchType = 0; foreach (KeyValuePair <byte, byte> map in pVipInfo.CurrceyLevel.CanUseLauncher) { LaunchType = map.Key; break; } if (LaunchType >= ConstValue.MAX_LAUNCHER_NUM) { return; } m_LaunchName.spriteName = string.Format("Launch_Name{0}", LaunchType); uint ItemID = LauncherSetting.LauncherDataList[LaunchType].nItemid; if (ItemID != 0 && FishConfig.Instance.m_ItemInfo.m_ItemMap.ContainsKey(ItemID) == false) { return; } tagItemConfig pItem = FishConfig.Instance.m_ItemInfo.m_ItemMap[ItemID]; m_LaunchIcon.spriteName = pItem.ItemIcon; //VIP解锁的功能 byte Indx = 0; //是否有反弹特性 if (pVipInfo.CurrceyLevel.LauncherReBoundNum > 0) { m_SkillIcon[Indx].spriteName = "Rebound"; m_SkillIcon[Indx].gameObject.SetActive(true); Indx++; } //是否有锁定 m_SkillIcon[Indx].spriteName = "Locked"; m_SkillIcon[Indx].gameObject.SetActive(true); Indx++; //if (pVipInfo.CurrceyLevel.IsCanLauncherLocking) //{ //} if (LauncherSetting.LauncherDataList[LaunchType].nSkillBind != 255) { m_SkillIcon[Indx].spriteName = string.Format("skill_{0}", LauncherSetting.LauncherDataList[LaunchType].nSkillBind); m_SkillIcon[Indx].gameObject.SetActive(true); Indx++; } }