// 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);
        }
    }
Пример #2
0
 public void Init(EnemyGroupManager groupBrain)
 {
     attack.Init(this);
     this.groupBrain     = groupBrain;
     health.DamageEvent += OnHitAlert;
 }