public void Update() { long num = (long)(ELSingleton <XmlSettings> .Instance.dailyPuzzleConfig.timeSpan * (float)(ELSingleton <ApplicationSettings> .Instance.DeploymentSettings.isDebug ? 60 : 86400)); if (DateLast == long.MaxValue) { DateLast = ELUtils.GetEpochTime() - num; } IsAvailable = (ELUtils.GetEpochTime() - DateLast > num); }
public bool ShowRewardedVideo(bool aIsExecute) { long timeSpan = GetTimeSpan(); bool num = ELUtils.GetEpochTime() - RewardedVideoAdDateLast >= timeSpan && ELSingleton <AdsManager> .Instance.ShowRewardedVideoAd(AdsManager.AdType.FreeCoins, aIsExecute); if (num & aIsExecute) { rewardedVideoAdDateLast = ELUtils.GetEpochTime(); ELSingleton <ApplicationSettings> .Instance.Save(); } return(num); }
public long GetTimeSpan() { return((long)(ELSingleton <XmlSettings> .Instance.dailyPuzzleConfig.timeSpan * (float)(ELSingleton <ApplicationSettings> .Instance.DeploymentSettings.isDebug ? 60 : 86400)) - ELUtils.GetEpochTime() + DateLast); }
private void SetupNextTime() { IsAvailable = false; DateLast = ELUtils.GetEpochTime(); ELSingleton <ApplicationSettings> .Instance.Save(); }
public long GetRewardedVideoTimeSpan() { return(GetTimeSpan() - ELUtils.GetEpochTime() + rewardedVideoAdDateLast); }