if (transform.position == target.position) { currentPatrolPoint = (currentPatrolPoint + 1) % patrolPoints.Count; } }