Пример #1
0
    public bool RewardedReachedLimit(RewardedAdsType type)//2.2.2
    {
        if (dailyRewardedFrequency == 0)
        {
            return(false);
        }
        dailyRewardedShown[(int)type] = PlayerPrefs.GetInt(type.ToString());
        if (!DateTimeManager.IsPeriodPassed(type.ToString()))
        {
            return(true);
        }
        if (dailyRewardedFrequency > 0 && dailyRewardedShown[(int)type] >= dailyRewardedFrequency)
        {
            return(true);
        }
        // if (Random.Range(0, 5) > 0) return true;
        dailyRewardedShown[(int)type]++;
        PlayerPrefs.SetInt(type.ToString(), dailyRewardedShown[(int)type]);
        if (dailyRewardedShown[(int)type] >= dailyRewardedFrequency)
        {
            DateTimeManager.SetDateTimeNow(type.ToString());
        }
        PlayerPrefs.Save();

        return(false);
    }