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; } } }
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); }
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); } } }
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); } }
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); } }
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); }