detects when level is cleared by defeating all the invaders