private bool GetNewTarget() { var enemies = EnemyGrid.GetEnemiesAroundPoint(transform.position, radius); if (enemies.Count == 0) { return(false); } var passedMax = 0f; foreach (var enemy in enemies) { if (!(passedMax < enemy.PathPassed)) { continue; } Target = enemy; passedMax = enemy.PathPassed; } return(true); }