public void InitPrize() { PayActivityData payData = GameManager.gameManager.PlayerDataPool.PayActivity; int totalYB = payData.MonthCardYBTotal; if (totalYB == 0) { m_ProcessBar.value = 0; } else { m_ProcessBar.value = (float)totalYB / (30 * 50); } m_TotalYBLabel.text = StrDictionary.GetClientDictionaryString("#{5104}", totalYB); if (payData.IsMonthCardFlag() == true && //已经触发月卡 payData.IsMonthCardOver() == false && //月卡未领取结束 payData.IsMonthCardTodayFlag() == false) //今日未领取月卡 { m_GetButton.isEnabled = true; m_RemainTips.gameObject.SetActive(true); } else { m_GetButton.isEnabled = false; m_RemainTips.gameObject.SetActive(false); } if (ChargeActivityLogic.Instance() != null) { ChargeActivityLogic.Instance().UpdateRemainTips(); } }
public static bool IsMonthCardCanGet() { PayActivityData payData = GameManager.gameManager.PlayerDataPool.PayActivity; if (payData.IsMonthCardFlag() == true && //已经触发月卡 payData.IsMonthCardOver() == false && //月卡未领取结束 payData.IsMonthCardTodayFlag() == false) //今日未领取月卡 { return(true); } return(false); }
void OnClickGet() { PayActivityData payData = GameManager.gameManager.PlayerDataPool.PayActivity; if (payData.IsMonthCardFlag() == false) { return; } if (payData.IsMonthCardOver() == true) { return; } if (payData.IsMonthCardTodayFlag() == true) { return; } //发包领奖 payData.SendMonthCardPacket(); }