| | |
| | | /// <summary>客服领取奖励列表 [[物品ID, 个数], ...]</summary> |
| | | public int[][] customerServiceRewards; |
| | | |
| | | /// <summary>SuperVIP入口红点</summary> |
| | | public Redpoint superVipRedpoint = new Redpoint(MainRedDot.SuperVIPRepoint); |
| | | |
| | | public override void Init() |
| | | { |
| | | var config = FuncConfigConfig.Get("SuperVIP"); |
| | | channelThresholdDict = JsonMapper.ToObject<Dictionary<string, int>>(config.Numerical1); |
| | | customerServiceRewards = JsonMapper.ToObject<int[][]>(config.Numerical2); |
| | | |
| | | // 每次重新登录后重置红点(重新上线后显示红点) |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += OnBeforePlayerDataInitializeEventOnRelogin; |
| | | RechargeManager.Instance.rechargeChangeEvent += OnRechargeChangeEvent; |
| | | } |
| | | |
| | | public override void Release() |
| | | { |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= OnBeforePlayerDataInitializeEventOnRelogin; |
| | | RechargeManager.Instance.rechargeChangeEvent -= OnRechargeChangeEvent; |
| | | } |
| | | |
| | | private void OnRechargeChangeEvent() |
| | | { |
| | | UpdateRedpoint(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | return false; |
| | | return RechargeManager.Instance.realRecharge >= thresholdYuan * 100; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重新登录(数据初始化前),先清除红点状态再重新判断显示 |
| | | /// </summary> |
| | | void OnBeforePlayerDataInitializeEventOnRelogin() |
| | | { |
| | | superVipRedpoint.state = RedPointState.None; |
| | | UpdateRedpoint(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据入口开放状态更新红点 |
| | | /// </summary> |
| | | public void UpdateRedpoint() |
| | | { |
| | | superVipRedpoint.state = IsEntryOpen() ? RedPointState.Simple : RedPointState.None; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清除红点(进入SuperVIPWin后调用) |
| | | /// </summary> |
| | | public void ClearRedpoint() |
| | | { |
| | | superVipRedpoint.state = RedPointState.None; |
| | | } |
| | | } |