Ejemplo n.º 1
0
        public override void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = characterState.GetCharacterControl(animator);


            if (control.Jump)
            {
                animator.SetBool(TransitionParameter.Jump.ToString(), true);
                if (control.MoveRight || control.MoveLeft)
                {
                    animator.SetBool(TransitionParameter.JumpForward.ToString(), true);
                }
            }

            if (control.Crouch)
            {
                animator.SetBool(TransitionParameter.Crouch.ToString(), true);
            }
            else if (!control.Crouch)
            {
                animator.SetBool(TransitionParameter.Crouch.ToString(), false);
            }

            if (control.Dash && !animator.GetBool("Jump"))
            {
                animator.SetBool(TransitionParameter.Dash.ToString(), true);
            }
            else if (!control.Crouch)
            {
                animator.SetBool(TransitionParameter.Dash.ToString(), false);
            }

            if (Constant)
            {
                ConstantMove(control, animator, stateInfo);
            }
            else
            {
                ControlledMove(control, animator, stateInfo);
            }

            if (control.Attack_Normal)
            {
                animator.SetBool(TransitionParameter.Attack.ToString(), true);
            }
        }
Ejemplo n.º 2
0
 public override void OnExit(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
 {
     characterState.GetCharacterControl(animator).Spell = false;
     ClearSpell();
 }
Ejemplo n.º 3
0
        override public void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = characterState.GetCharacterControl(animator);

            if (control.MoveRight && control.MoveLeft)
            {
                animator.SetBool(TransitionParameter.Move.ToString(), false);
                return;
            }

            if (control.Spell)
            {
                animator.SetBool(SpellTypeParameters.Hadoken.ToString(), true);
            }
            else
            {
                animator.SetBool(SpellTypeParameters.Hadoken.ToString(), false);
            }

            if (control.Attack_Normal)
            {
                animator.SetBool(TransitionParameter.Attack.ToString(), true);
            }

            if (control.Jump)
            {
                animator.SetBool(TransitionParameter.Jump.ToString(), true);
                if (control.JumpForward)
                {
                    animator.SetBool(TransitionParameter.JumpForward.ToString(), true);
                }
            }


            if (control.Crouch)
            {
                animator.SetBool(TransitionParameter.Crouch.ToString(), true);
            }
            else if (!control.Crouch)
            {
                animator.SetBool(TransitionParameter.Crouch.ToString(), false);
            }

            if (control.Dash)
            {
                animator.SetBool(SpellTypeParameters.Dash.ToString(), true);
            }
            else if (!control.Crouch)
            {
                animator.SetBool(SpellTypeParameters.Dash.ToString(), false);
            }

            if (control.MoveRight)
            {
                animator.SetBool(TransitionParameter.Move.ToString(), true);
            }

            if (control.MoveLeft)
            {
                animator.SetBool(TransitionParameter.Move.ToString(), true);
            }
        }
Ejemplo n.º 4
0
 public override void OnExit(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
 {
     characterState.GetCharacterControl(animator).SkinnedMeshAnimator.runtimeAnimatorController = DeathAnimationManager.Instance.GetNormalAnimator();
 }
Ejemplo n.º 5
0
        public override void OnEnter(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = characterState.GetCharacterControl(animator);

            control.SkinnedMeshAnimator.applyRootMotion = true;
        }