private void Awake()
 {
     cc   = GetComponent <CharacterController2D>();
     anim = GetComponentInChildren <PlayerAnimatorController>();
 }
Example #2
0
 public void UpdateAnimationState(Vector3 move, CharacterController2D controller)
 {
     ac.SetHorizontalVelocity(Mathf.Abs(move.x));
     ac.SetVerticalVelocity(controller.isGrounded ? 0 : move.y);
     ac.SetIsLanding(move.y <= 0 && controller.IsNearGround(Mathf.Abs(GlobalConstants.GRAVITY)));
 }