Beispiel #1
0
    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);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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());
    }
Beispiel #4
0
 public long GetTimeSpan()
 {
     return((long)(ELSingleton <XmlSettings> .Instance.dailyPuzzleConfig.timeSpan * (float)(ELSingleton <ApplicationSettings> .Instance.DeploymentSettings.isDebug ? 60 : 86400)) - ELUtils.GetEpochTime() + DateLast);
 }
Beispiel #5
0
 private void SetupNextTime()
 {
     IsAvailable = false;
     DateLast    = ELUtils.GetEpochTime();
     ELSingleton <ApplicationSettings> .Instance.Save();
 }
Beispiel #6
0
 public long GetRewardedVideoTimeSpan()
 {
     return(GetTimeSpan() - ELUtils.GetEpochTime() + rewardedVideoAdDateLast);
 }