void FacingDirection() { if (b_PhysicsBehavior.GetVelocity().x > 0) { mFacingDirection = DIRECTION.RIGHT; mTargetingVector = Vector2.right; b_BasicAttackBehavior.SetIsFacingRight(true); } if (b_PhysicsBehavior.GetVelocity().x < 0) { mFacingDirection = DIRECTION.LEFT; mTargetingVector = Vector2.left; b_BasicAttackBehavior.SetIsFacingRight(false); } }
void UpdateAnimations() { bool isMoving = b_PhysicsBehavior.GetVelocity().x != 0; b_AnimatorBehavior.SetIsMoving(isMoving); bool isGrounded = b_PhysicsBehavior.GetIsGrounded(); b_AnimatorBehavior.SetIsGrounded(isGrounded); b_AnimatorBehavior.SetFacingDirection(mFacingDirection); }