private void DestroyRemainingPowerUps() { GameObject[] powerUps = GameObject.FindGameObjectsWithTag(Tags.PowerUp); if (powerUps == null) { return; } foreach (var powerUp in powerUps) { PowerUpController selfDestructScript = powerUp.GetComponent <PowerUpController>(); if (selfDestructScript == null) { return; } selfDestructScript.DestroyMe(); } }