示例#1
0
        public override void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            {
                CharacterController controller = characterState.GetCharacterController(animator);

                if (controller.Attack)
                {
                    //Debug.Log("Idle to Attack");
                    animator.SetBool(TransitionParameters.Attack.ToString(), true);
                }

                if (controller.Jump)
                {
                    animator.SetBool(TransitionParameters.Jump.ToString(), true);
                    animator.SetBool(TransitionParameters.Move.ToString(), false);
                    //return;
                }
                if (controller.MoveRight)
                {
                    animator.SetBool(TransitionParameters.Move.ToString(), true);
                    //return;
                }
                if (controller.MoveLeft)
                {
                    animator.SetBool(TransitionParameters.Move.ToString(), true);
                    //return;
                }
            }
        }
示例#2
0
        public override void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterController control = characterState.GetCharacterController(animator);

            control.GravityMultiplier = Gravity.Evaluate(stateInfo.normalizedTime);
            control.PullMultiplier    = Pull.Evaluate(stateInfo.normalizedTime);
        }
示例#3
0
 public override void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
 {
     if (stateInfo.normalizedTime >= CheckTime)
     {
         CharacterController controller = characterState.GetCharacterController(animator);
         if (IsGrounded(controller))
         {
             animator.SetBool(TransitionParameters.Grounded.ToString(), true);
         }
         else
         {
             animator.SetBool(TransitionParameters.Grounded.ToString(), false);
         }
     }
 }
示例#4
0
        public override void OnEnter(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            Debug.Log("Jab!");
            animator.SetBool(TransitionParameters.Attack.ToString(), false);

            GameObject obj  = PoolManager.Instance.GetGameObject(PoolObjectType.ATTACKINFO);
            AttackInfo info = obj.GetComponent <AttackInfo>();

            obj.SetActive(true);

            info.ResetInfo(this, characterState.GetCharacterController(animator));

            if (!AttackManager.Instance.CurrentAttacks.Contains(info))
            {
                AttackManager.Instance.CurrentAttacks.Add(info);
            }
        }
示例#5
0
        public override void UpdateAbility(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
        {
            CharacterController control = characterState.GetCharacterController(animator);

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

            if (Reflex)
            {
                ReflexMove(control, animator, stateInfo);
            }
            else
            {
                ControledMove(control, animator, stateInfo);
            }
        }
示例#6
0
 public override void OnEnter(CharacterState characterState, Animator animator, AnimatorStateInfo stateInfo)
 {
     characterState.GetCharacterController(animator).RIGID_BODY.AddForce(Vector3.up * JumpForce);
     animator.SetBool(TransitionParameters.Grounded.ToString(), false);
 }