using System.Collections; using System.Collections.Generic; using UnityEngine; public class WhackSpawner : MonoBehaviour { public GameObject toSpawn; private bool alreadySpawned = false; public void SpawnDied() { alreadySpawned = false; } public void SpawnEnemy() { if (!WhackManager.instance.isOver) { if (!alreadySpawned) { Instantiate(toSpawn, transform, false); alreadySpawned = true; } } } }