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