Adding treat eating cooldown
This commit is contained in:
@@ -10,6 +10,7 @@ public class Spawner : MonoBehaviour
|
||||
public float spawnInterval = 1f;
|
||||
[SerializeField] private int maxAlive = 0;
|
||||
[SerializeField] private bool spawnOnStart = true;
|
||||
[SerializeField] private bool repeatSpawns = true;
|
||||
|
||||
private readonly List<GameObject> spawned = new List<GameObject>();
|
||||
|
||||
@@ -23,8 +24,11 @@ public class Spawner : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Start the spawning process using a Coroutine
|
||||
StartCoroutine(SpawnRoutine());
|
||||
if (repeatSpawns)
|
||||
{
|
||||
// Start the spawning process using a Coroutine
|
||||
StartCoroutine(SpawnRoutine());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator SpawnRoutine()
|
||||
|
||||
Reference in New Issue
Block a user