Exemplo n.º 1
0
        public override void UpdateAbility(CharactersState charactersState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = charactersState.GetCharacterControl(animator);

            control.GravityMultiplier = Gravity.Evaluate(stateInfo.normalizedTime);
            control.PullMultiplier    = Pull.Evaluate(stateInfo.normalizedTime);
        }
Exemplo n.º 2
0
        public override void UpdateAbility(CharactersState charactersState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = charactersState.GetCharacterControl(animator);



            if (control.Attack)
            {
                animator.SetBool(TransitionParameter.Attack.ToString(), true);
            }
            if (control.Jump)
            {
                animator.SetBool(TransitionParameter.Jump.ToString(), true);
            }
            //Code to control the Idle animations
            if (control.MoveRight)
            {
                animator.SetBool(TransitionParameter.Move.ToString(), true);
            }

            if (control.MoveLeft)
            {
                animator.SetBool(TransitionParameter.Move.ToString(), true);
            }
        }
Exemplo n.º 3
0
        public override void UpdateAbility(CharactersState charactersState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = charactersState.GetCharacterControl(animator);

            if (stateInfo.normalizedTime >= CheckTime)
            {
                if (IsGrounded(control))
                {
                    animator.SetBool(TransitionParameter.Grounded.ToString(), true);
                }
                else
                {
                    animator.SetBool(TransitionParameter.Grounded.ToString(), false);
                }
            }
        }
Exemplo n.º 4
0
        public override void UpdateAbility(CharactersState charactersState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterControl control = charactersState.GetCharacterControl(animator);

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

            if (Constant)
            {
                ConstantMove(control, animator, stateInfo);
            }
            else
            {
                ControlledMove(control, animator, stateInfo);
            }
        }
Exemplo n.º 5
0
 public override void OnEnter(CharactersState characterState, Animator animator, AnimatorStateInfo stateInfo)
 {
     characterState.GetCharacterControl(animator).RIGID_BODY.AddForce(Vector3.up * JumpForce);
     animator.SetBool(TransitionParameter.Grounded.ToString(), false);
 }