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); }
private string GetAPIKey(string aMethod, string aId, int aValue, string aValueString) { string randomString; string str = randomString = GetRandomString(8); randomString += "ABC5347834687ABC873646FF"; randomString += aMethod; if (aId != null) { randomString += aId; } randomString += aValue; if (aValueString != null) { randomString += aValueString; } string str2 = ELUtils.SHA256(randomString); return(string.Concat(str1: GetRandomString(32), str0: str + str2).ToLowerInvariant()); }
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); }