Beispiel #1
0
    private void OnServerTimeStatusChanged(int serverTime)
    {
        this.lastCheckTime = Time.realtimeSinceStartup;
        int doubleRewardStartTime = GameProgress.GetDoubleRewardStartTime();

        if (doubleRewardStartTime > 0)
        {
            int num = doubleRewardStartTime + this.rewardTime - serverTime;
            if (num > 0)
            {
                this.doubleRewardEndTime = Time.realtimeSinceStartup + (float)num;
            }
            else
            {
                this.doubleRewardEndTime = -1f;
            }
        }
        else
        {
            this.doubleRewardEndTime = -1f;
        }
        if (this.status == DoubleRewardManager.Status.Uninitialized)
        {
            this.status = DoubleRewardManager.Status.Initialized;
            if (this.OnInitialize != null)
            {
                this.OnInitialize();
            }
        }
    }