Example #1
0
 public PlayerStastics()
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
 }
Example #2
0
 public PlayerStastics(float levelTime, int screenRotateTimes)
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
     this.stageTime         = levelTime;
     this.screenRotateTimes = screenRotateTimes;
 }
 public void ResetPlugin(float totalTime)
 {
     this.totalTime      = totalTime;
     this.isTiming       = false;
     this.IsLevelTimeUp  = false;
     this.countDownTimer = this.totalTime;
     this.SetTimingText(totalTime, totalTime);
 }
Example #4
0
        public static void UpdateField(ref SafeFloat field, float newValue, Action <float, float> updateDelegate)
        {
            float num = field.Value;

            field.Value = newValue;
            if (updateDelegate != null)
            {
                updateDelegate(num, newValue);
            }
        }
Example #5
0
 public override void Core()
 {
     if (this._timing)
     {
         float oldTimer = (float)this._timer;
         this._timer += Time.deltaTime * this._levelActor.levelEntity.TimeScale;
         this.SetTimingText(oldTimer, (float)this._timer);
     }
     base.Core();
 }
Example #6
0
        public MonsterStastics(string monsterName, string configType, int level)
        {
            MonsterKey key = new MonsterKey {
                monsterName = monsterName,
                configType  = configType,
                level       = level
            };

            this.key = key;
            this.dps = 0f;
        }
 public LevelActorCountDownPlugin(LevelActor levelActor, float totalTime, bool timesUpWin = false)
 {
     this._levelActor            = levelActor;
     this.timeUpWin              = timesUpWin;
     this.totalTime              = totalTime;
     this.isTiming               = false;
     this.IsLevelTimeUp          = false;
     this.countDownSpeedRatio    = 1f;
     this.speedRatioInNormalTime = 1f;
     this.speedRatioInWitchTime  = 1f;
     this.OnTimingChange         = (Action <float, float>)Delegate.Combine(this.OnTimingChange, new Action <float, float>(this.SetTimingText));
     this.SetTimingText(0f, totalTime);
 }
 public override void OnAdded()
 {
     this.countDownTimer = this.totalTime;
 }
Example #9
0
        public override void Core()
        {
            this._frameIndex++;
            if (this._frameIndex > 20)
            {
                this._frameHitSet.Clear();
                this._frameIndex = 0;
            }
            base.Core();
            if (this._timeSlowTimer > 0f)
            {
                this._timeSlowTimer -= Time.unscaledDeltaTime;
                if (this._timeSlowTimer <= 0f)
                {
                    Time.timeScale      = 1f;
                    Time.fixedDeltaTime = 0.02f * Time.timeScale;
                    Singleton <WwiseAudioManager> .Instance.Post("Avatar_TimeSlow_End", null, null, null);

                    if (this._timeSlowDoneCallback != null)
                    {
                        this._timeSlowDoneCallback();
                        this._timeSlowDoneCallback = null;
                    }
                }
            }
            if (this._swapTimerState == LevelMinSwapTimerState.Running)
            {
                this._levelMinSwapTimer -= this.levelEntity.TimeScale * Time.deltaTime;
                if (this._levelMinSwapTimer < 0f)
                {
                    this._swapTimerState    = LevelMinSwapTimerState.Idle;
                    this._levelMinSwapTimer = 0f;
                }
            }
            if (this._avatarSwapState == AvatarSwapState.Started)
            {
                this._avatarSwapState = AvatarSwapState.Idle;
            }
            if (this._levelComboTimer > 0f)
            {
                BaseMonoAvatar localAvatar = Singleton <AvatarManager> .Instance.GetLocalAvatar();

                if (localAvatar != null)
                {
                    string currentSkillID = localAvatar.CurrentSkillID;
                    if (!string.IsNullOrEmpty(currentSkillID) && localAvatar.config.Skills.ContainsKey(currentSkillID))
                    {
                        float comboTimerPauseNormalizedTimeStart = localAvatar.config.Skills[currentSkillID].ComboTimerPauseNormalizedTimeStart;
                        float comboTimerPauseNormalizedTimeStop  = localAvatar.config.Skills[currentSkillID].ComboTimerPauseNormalizedTimeStop;
                        float currentNormalizedTime = localAvatar.GetCurrentNormalizedTime();
                        if (comboTimerPauseNormalizedTimeStart < comboTimerPauseNormalizedTimeStop)
                        {
                            if ((currentNormalizedTime > comboTimerPauseNormalizedTimeStart) && (currentNormalizedTime < comboTimerPauseNormalizedTimeStop))
                            {
                                this._comboTimerState = ComboTimerState.Pause;
                            }
                            else if (currentNormalizedTime > comboTimerPauseNormalizedTimeStop)
                            {
                                this._comboTimerState = ComboTimerState.Running;
                            }
                        }
                    }
                }
                if (this._comboTimerState == ComboTimerState.Running)
                {
                    this._levelComboTimer -= this.levelEntity.TimeScale * Time.deltaTime;
                }
                if (this._levelComboTimer < 0f)
                {
                    if (this.comboTimeUPCallback != null)
                    {
                        this.comboTimeUPCallback();
                    }
                    else
                    {
                        DelegateUtils.UpdateField(ref this.levelCombo, 0, this.onLevelComboChanged);
                    }
                }
            }
        }
Example #10
0
 public override void SetValue(object value)
 {
     this.mSafeValue = (float)value;
 }
Example #11
0
 public override void OnAdded()
 {
     this._timer = 0f;
 }
Example #12
0
 public void ResetPlayerStasticsData()
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
 }
Example #13
0
 public override void Core()
 {
     base.Core();
     this._unscaledLevelTime += Time.unscaledDeltaTime;
     this._frameCount        += 1;
 }
Example #14
0
 public LevelAntiCheatPlugin(LevelDamageStasticsPlugin damagePlugin)
 {
     this._damagePlugin   = damagePlugin;
     this._levelStartTime = (SafeFloat)Miscs.GetTimeStampFromDateTime(DateTime.Now);
 }