private void FixedUpdate() { if (observeSurroundings) { foreach (GameObject goal in gManager.goals) { if (IsInView(gameObject, goal)) { parentAI.FoundGoal(goal); } } } }