void Refresh() { int chargeVal = GameCenter.lovePackageMng.rechargeVal; int prof = GameCenter.mainPlayerMng.MainPlayerInfo.Prof; int stage = GameCenter.lovePackageMng.stage; love = ConfigMng.Instance.GetLoveSpreeRef(prof, stage); if (love != null) { if (rechargeLab != null) { rechargeLab.text = chargeVal + "/" + love.money; } if (chargeVal >= love.money) { if (rechargeBtn != null) { rechargeBtn.gameObject.SetActive(false); } if (takeRewardBtn != null) { takeRewardBtn.gameObject.SetActive(true); } } else { if (rechargeBtn != null) { rechargeBtn.gameObject.SetActive(true); } if (takeRewardBtn != null) { takeRewardBtn.gameObject.SetActive(false); } } if (rechargeNeedLab != null) { rechargeNeedLab.text = love.money.ToString(); } for (int i = 0, max = items.Length; i < max; i++) { if (love.reward.Count > i) { items[i].FillInfo(new EquipmentInfo(love.reward[i].eid, love.reward[i].count, EquipmentBelongTo.PREVIEW)); } else { items[i].gameObject.SetActive(false); } } } }
/// <summary> /// 获得领取奖励关闭爱心奖励界面 /// </summary> protected void S2C_GetLoveRewared(Pt pt) { pt_love_reward_list_d808 msg = pt as pt_love_reward_list_d808; if (msg != null) { GameCenter.uIMng.SwitchToUI(GUIType.NONE); int prof = GameCenter.mainPlayerMng.MainPlayerInfo.Prof; LoveSpreeRef nextLove = ConfigMng.Instance.GetLoveSpreeRef(prof, stage + 1); if (nextLove == null) { GameCenter.lovePackageMng.isOpenLoveReward = false; } } }
/// <summary> /// 爱心奖励红点 /// </summary> public void SetLoveRedRemind() { int prof = GameCenter.mainPlayerMng.MainPlayerInfo.Prof; LoveSpreeRef love = ConfigMng.Instance.GetLoveSpreeRef(prof, stage); bool isRed = false; if (love != null) { if (rechargeVal >= love.money) { isRed = true; } } GameCenter.mainPlayerMng.SetFunctionRed(FunctionType.LOVEREWARD, isRed); }
/// <summary> /// 领取首冲后隐藏入口 /// </summary> void RefreshFirstChargeBtn() { if (GameCenter.firstChargeBonusMng.firstChargeBonusStates == (int)FirstChargeState.HAVECHARGEGET) { if (GameCenter.mainPlayerMng != null) { int prof = GameCenter.mainPlayerMng.MainPlayerInfo.Prof; int stage = GameCenter.lovePackageMng.stage; LoveSpreeRef love = ConfigMng.Instance.GetLoveSpreeRef(prof, stage); if (love != null) { GameCenter.lovePackageMng.isOpenLoveReward = true; GameCenter.lovePackageMng.SetLoveRedRemind(); } } if (btnFirstCharge != null) { GameCenter.mainPlayerMng.SetServerActiveOpen(FunctionType.FIRSTCHARGE, false); } //开启理财周卡 if (btnPrivilege != null) { btnPrivilege.gameObject.SetActive(true); } // GameCenter.mainPlayerMng.SetServerActiveOpen(FunctionType.PRIVILEGE, true); } else { GameCenter.lovePackageMng.isOpenLoveReward = false; if (btnPrivilege != null) { btnPrivilege.gameObject.SetActive(false); } //GameCenter.mainPlayerMng.SetServerActiveOpen(FunctionType.PRIVILEGE, false); } }