diff --git a/Assets/_Project/Scripts/Gameplay/WaveDefinition.cs b/Assets/_Project/Scripts/Gameplay/WaveDefinition.cs index 3aae46e..f487e7c 100644 --- a/Assets/_Project/Scripts/Gameplay/WaveDefinition.cs +++ b/Assets/_Project/Scripts/Gameplay/WaveDefinition.cs @@ -17,12 +17,7 @@ namespace TD.Gameplay [Tooltip("How many enemies of this type to spawn.")] public int Count; - [Tooltip("How many enemies spawn per burst. 1 (default) = original one-at-a-time " + - "behaviour. Values > 1 spawn that many simultaneously before waiting SpawnInterval.")] - public int ChunkSize; - - [Tooltip("Seconds between each burst. With ChunkSize > 1 this is the pause between " + - "groups rather than between individual enemies.")] + [Tooltip("Seconds between each burst. Enemies spawn in bursts of 10% of Count at a time.")] public float SpawnInterval; } diff --git a/Assets/_Project/Scripts/Gameplay/WaveManager.cs b/Assets/_Project/Scripts/Gameplay/WaveManager.cs index 4ca920f..96e507b 100644 --- a/Assets/_Project/Scripts/Gameplay/WaveManager.cs +++ b/Assets/_Project/Scripts/Gameplay/WaveManager.cs @@ -336,7 +336,7 @@ namespace TD.Gameplay { if (entry.EnemyType == null || entry.Count <= 0) continue; - int chunkSize = Mathf.Max(1, entry.ChunkSize); + int chunkSize = Mathf.Max(1, Mathf.RoundToInt(entry.Count * 0.1f)); for (int i = 0; i < entry.Count; i += chunkSize) { int burst = Mathf.Min(chunkSize, entry.Count - i);