void Update() { if (!aiActive) { return; } currentState.UpdateState(this); }
void Update() { if (!aiActive) { return; } currentState.UpdateState(this); if (animator != null) { if (lookingRight && body.velocity.x < 0) { animator.SetBool("lookingRight", false); lookingRight = false; } if (!lookingRight && body.velocity.x > 0) { animator.SetBool("lookingRight", true); lookingRight = true; } } }