private void onAnimationStateChanged(AbstractCharacterAnimator.State newState)
 {
     if (((base.CharacterView.Character != null) && base.CharacterView.Character.IsPlayerCharacter) && !base.CharacterView.Character.IsSupport)
     {
         PlayerView.Binder.AudioSystem.stopAudioGroup(this.m_footStepTypeL);
         PlayerView.Binder.AudioSystem.stopAudioGroup(this.m_footStepTypeR);
     }
 }
 protected override bool onGetTargetAnimationState(out AbstractCharacterAnimator.State state, out float speed)
 {
     if ((base.CharacterView.Character.TargetCharacter == null) && (base.CharacterView.Character.ManualTargetPos == Vector3.zero))
     {
         speed = 1f;
         state = AbstractCharacterAnimator.State.IDLE;
         return(true);
     }
     if (base.CharacterView.Character.Velocity != Vector3.zero)
     {
         speed = base.CharacterView.Character.MovementSpeed(true) * 0.3f;
         state = AbstractCharacterAnimator.State.RUN;
         return(true);
     }
     return(base.onGetTargetAnimationState(out state, out speed));
 }
Exemple #3
0
 protected override bool onGetTargetAnimationState(out AbstractCharacterAnimator.State state, out float speed)
 {
     speed = 1f;
     state = AbstractCharacterAnimator.State.IDLE;
     if (base.CharacterView.Character.isAttacking())
     {
         return(false);
     }
     if (base.CharacterView.Character.isExecutingSkill(SkillType.Whirlwind) || base.CharacterView.Character.isExecutingSkill(SkillType.Dash))
     {
         return(false);
     }
     if ((base.CharacterView.Character.TargetCharacter == null) && (base.CharacterView.Character.ManualTargetPos == Vector3.zero))
     {
         state = AbstractCharacterAnimator.State.IDLE;
         return(true);
     }
     if (base.CharacterView.Character.ExternallyControlled)
     {
         if (base.CharacterView.Character.SpinningAround)
         {
             state = AbstractCharacterAnimator.State.RUN;
             speed = 2f;
             return(true);
         }
         state = AbstractCharacterAnimator.State.IDLE;
         return(true);
     }
     if (base.CharacterView.Character.Velocity != Vector3.zero)
     {
         speed = Mathf.Clamp(1.15f + ((base.CharacterView.Character.MovementSpeed(true) * 0.05f) * Easing.Apply(base.CharacterView.Character.RunAccelerationTimer.normalizedProgress(), ConfigGameplay.CHARACTER_FULLSPEED_ACCELERATION_EASING)), 0.1f, float.MaxValue);
         state = AbstractCharacterAnimator.State.RUN;
         return(true);
     }
     return(base.onGetTargetAnimationState(out state, out speed));
 }
 protected override bool onGetTargetAnimationState(out AbstractCharacterAnimator.State state, out float speed)
 {
     speed = 1.5f;
     state = AbstractCharacterAnimator.State.IDLE;
     return(true);
 }