Exemplo n.º 1
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            if (this.animator)
            {
                this.animator.SetBool("inCombat", true);
            }
            this.hitPauseTimer -= Time.fixedDeltaTime;

            if (this.hitPauseTimer <= 0f && this.inHitPause)
            {
                base.ConsumeHitStopCachedState(this.hitStopCachedState, base.characterMotor, this.animator);
                this.inHitPause = false;
            }

            if (!this.inHitPause)
            {
                this.stopwatch += Time.fixedDeltaTime;
            }
            else
            {
                if (base.characterMotor)
                {
                    base.characterMotor.velocity = Vector3.zero;
                }
                if (this.animator)
                {
                    this.animator.SetFloat("Slash.playbackRate", 0f);
                }
            }

            if (this.stopwatch >= this.duration * 0.225f && this.stopwatch <= this.duration * 0.5f)
            {
                this.FireAttack();
            }

            if (this.stopwatch >= (this.duration * 0.5f) && base.inputBank.skill2.down && base.skillLocator.secondary.skillDef.skillNameToken == "PALADIN_SECONDARY_LUNARSHARD_NAME")
            {
                this.cancelling = true;
                base.skillLocator.secondary.ExecuteIfReady();
                return;
            }

            if (base.isAuthority)
            {
                if (base.fixedAge >= this.earlyExitDuration && base.inputBank.skill1.down)
                {
                    var nextSwing = new Slash();
                    nextSwing.swingIndex = this.swingIndex + 1;
                    this.outer.SetNextState(nextSwing);
                    return;
                }

                if (base.fixedAge >= this.duration)
                {
                    this.outer.SetNextStateToMain();
                    return;
                }
            }
        }
Exemplo n.º 2
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            if (this.animator)
            {
                this.animator.SetBool("inCombat", true);
            }
            this.hitPauseTimer -= Time.fixedDeltaTime;

            if (this.hitPauseTimer <= 0f && this.inHitPause)
            {
                base.ConsumeHitStopCachedState(this.hitStopCachedState, base.characterMotor, this.animator);
                this.inHitPause = false;
                if (this.storedVelocity != Vector3.zero)
                {
                    base.characterMotor.velocity = this.storedVelocity;
                }
            }

            if (!this.inHitPause)
            {
                this.stopwatch += Time.fixedDeltaTime;
            }
            else
            {
                if (base.characterMotor)
                {
                    base.characterMotor.velocity = Vector3.zero;
                }
                if (this.animator)
                {
                    this.animator.SetFloat("Slash.playbackRate", 0f);
                }
            }

            if (this.stopwatch >= this.duration * 0.2669f && this.stopwatch <= this.duration * 0.4f)
            {
                this.FireAttack();
            }

            if (base.isAuthority)
            {
                if (base.fixedAge >= this.earlyExitDuration && base.inputBank.skill1.down)
                {
                    var nextSwing = new Slash();
                    nextSwing.swingIndex = this.swingIndex + 1;
                    this.outer.SetNextState(nextSwing);
                    return;
                }

                if (base.fixedAge >= this.duration)
                {
                    this.outer.SetNextStateToMain();
                    return;
                }
            }
        }