void OnAllEnemiesKilled(WaveEnemyGroup enemyGroup) { Log.Info("All enemies in current group killed"); enemyGroup.AllEnemiesKilled -= OnAllEnemiesKilled; if (enemyGroups.TrueForAll(x => x.AllEnemiesDead)) { WaveCompleted = true; WaveComplete?.Invoke(); } }
public void AddGroup(WaveEnemyGroup enemyGroup) { enemyGroups.Add(enemyGroup); }
void OnAllEnemiesSpawned(WaveEnemyGroup enemyGroup) { Log.Info("All enemies in current group spawned"); enemyGroup.AllSpawned -= OnAllEnemiesSpawned; MoveToNextGroup(); }