// Call this to spawn enemies on the Map Manager public void SpawnEnemies() { GenerateSpawnZones(); TrimSpawnZones(); EnemyGroupManager enemyGroupManager = new EnemyGroupManager(spawnZones); List <EnemyToSpawn> enemies = enemyGroupManager.GetEnemiesToSpawn(); foreach (EnemyToSpawn enemy in enemies) { mapManager.instantiate(enemyPrefab, enemy.gridPosition, enemy.stats); } }
public void Init(EnemyGroupManager groupBrain) { attack.Init(this); this.groupBrain = groupBrain; health.DamageEvent += OnHitAlert; }