void FixedUpdate() { if (!active) { return; } if (foxCollider.IsTouching(endCollider)) { active = false; StopDogs(); end.Unblock(); fox.Exit(end.OffScreen()); Invoke("WinEffect", winEffectDelay); return; } foreach (Dog dog in dogs) { Collider2D dogCollider = dog.GetComponent <Collider2D> (); if (dogCollider.IsTouching(foxCollider)) { KillFox(dog); return; } } }