| | |
| | | { |
| | | [SerializeField] ImageEx vipImage; |
| | | [SerializeField] TextEx vipText; |
| | | [SerializeField] OutlineEx vipTextOutline; |
| | | [SerializeField] ImageEx rateImage; |
| | | [SerializeField] TextEx rateText; |
| | | [SerializeField] TextEx titleText; |
| | |
| | | return; |
| | | |
| | | CTGConfig config = CTGConfig.Get(ctgId); |
| | | |
| | | vipImage.SetActive(config.VipLevel > 0); |
| | | vipText.text = config.VipLevel > 0 ? Language.Get($"VipLevelInfo{config.VipLevel}") : string.Empty; |
| | | if (config.VipLevel > 0) |
| | | { |
| | | vipImage.SetSprite($"VipLevel{config.VipLevel}"); |
| | | vipText.text = Language.Get($"VipLevelInfo{config.VipLevel}"); |
| | | vipText.color = InvestModel.Instance.GetTextColor(config.VipLevel); |
| | | vipTextOutline.OutlineColor = InvestModel.Instance.GetOutlineColor(config.VipLevel); |
| | | } |
| | | |
| | | rateText.text = Language.Get("DailySpecials07", config.Percentage); |
| | | |
| | | bool isCanBuy = manager.IsCanBuyCTG(ctgId); |
| | |
| | | buyButton.interactable = isCanBuy; |
| | | buyButton.SetListener(() => |
| | | { |
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.PrivilegeCard) && config.VipLevel == 1 && !InvestModel.Instance.IsInvested(InvestModel.monthCardType)) |
| | | if (config.VipLevel > 0 && !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.PrivilegeCard)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("MinggeAuto8"); |
| | | return; |
| | | } |
| | | if (config.VipLevel == 1 && !InvestModel.Instance.IsInvested(InvestModel.monthCardType)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("MinggeAuto5"); |
| | | UIManager.Instance.OpenWindow<PrivilegeCardWin>(); |
| | | return; |
| | | } |
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.PrivilegeCard) && config.VipLevel == 2 && !InvestModel.Instance.IsInvested(InvestModel.foreverCardType)) |
| | | if (config.VipLevel == 2 && !InvestModel.Instance.IsInvested(InvestModel.foreverCardType)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("MinggeAuto7"); |
| | | UIManager.Instance.OpenWindow<PrivilegeCardWin>(); |