예제 #1
0
 public PlayerStastics()
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
 }
예제 #2
0
 public PlayerStastics(float levelTime, int screenRotateTimes)
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
     this.stageTime         = levelTime;
     this.screenRotateTimes = screenRotateTimes;
 }
예제 #3
0
 public void ResetPlugin(float totalTime)
 {
     this.totalTime      = totalTime;
     this.isTiming       = false;
     this.IsLevelTimeUp  = false;
     this.countDownTimer = this.totalTime;
     this.SetTimingText(totalTime, totalTime);
 }
예제 #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);
            }
        }
예제 #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();
 }
예제 #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;
        }
예제 #7
0
 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);
 }
예제 #8
0
 public override void OnAdded()
 {
     this.countDownTimer = this.totalTime;
 }
예제 #9
0
파일: LevelActor.cs 프로젝트: slb1988/agame
        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);
                    }
                }
            }
        }
예제 #10
0
 public override void SetValue(object value)
 {
     this.mSafeValue = (float)value;
 }
예제 #11
0
 public override void OnAdded()
 {
     this._timer = 0f;
 }
예제 #12
0
 public void ResetPlayerStasticsData()
 {
     this.screenRotateTimes = 0;
     this.stageTime         = 0f;
 }
예제 #13
0
 public override void Core()
 {
     base.Core();
     this._unscaledLevelTime += Time.unscaledDeltaTime;
     this._frameCount        += 1;
 }
예제 #14
0
 public LevelAntiCheatPlugin(LevelDamageStasticsPlugin damagePlugin)
 {
     this._damagePlugin   = damagePlugin;
     this._levelStartTime = (SafeFloat)Miscs.GetTimeStampFromDateTime(DateTime.Now);
 }