private void CheckDirection() { if (player.transform.Position.X > entity.transform.Position.X + 200) { childDirection.SetNowRight(false); } else if (player.transform.Position.X < entity.transform.Position.X - 200) { childDirection.SetNowLeft(false); } else { childDirection.SetNone(); } if (IsChildForward()) { childDirection.SetNone(); } CheckFruit(); }