Merge branch 'main' of https://gitea.deprived.dev/Sveskejuice/ColorDefense
This commit is contained in:
commit
ab636db3e9
|
@ -44,6 +44,8 @@ public class EnemySpawnManager : MonoBehaviour
|
||||||
|
|
||||||
public void OnPlayButtonClicked()
|
public void OnPlayButtonClicked()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.CurrentNumEnemies != 0) return;
|
||||||
|
|
||||||
HasStarted = true;
|
HasStarted = true;
|
||||||
PopWave();
|
PopWave();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +60,7 @@ public class EnemySpawnManager : MonoBehaviour
|
||||||
if (HasStarted && IsAutoPlaying)
|
if (HasStarted && IsAutoPlaying)
|
||||||
time += Time.deltaTime;
|
time += Time.deltaTime;
|
||||||
|
|
||||||
if (waveQueue.Count > 0 && waveQueue.Peek().spawnTime < time)
|
if (waveQueue.Count > 0 && (GameManager.Instance.CurrentNumEnemies == 0 && IsAutoPlaying))
|
||||||
{
|
{
|
||||||
PopWave();
|
PopWave();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue