Esempio n. 1
0
 /// <summary>
 /// Attachs a wave profile to the current enemy spawner.
 /// </summary>
 /// <param name="toAttach">To attach.</param>
 public void attachProfile(WaveProfile toAttach)
 {
     spawnDistance  = toAttach.spawnDistance;
     spanwFrequency = toAttach.spanwFrequency;
     spawnFor       = toAttach.spawnFor;
     whatToSpawn    = toAttach.whatToSpawn;
 }
Esempio n. 2
0
 /// <summary>
 /// Commenses a horde of invaders.
 /// </summary>
 void CommenseHorde()
 {
     if (waveProfiles.waves != null && waveProfiles.waves.Count > 0 && currentWaveNumber < waveProfiles.waves.Count)
     {
         waves.Add(gameObject.AddComponent(typeof(EnemySpawner)) as EnemySpawner);
         WaveProfile currentProfile = waveProfiles.waves [currentWaveNumber];
         waves [currentWaveNumber].enabled = true;
         waves [currentWaveNumber].attachProfile(currentProfile);
         waves [currentWaveNumber].target = hordesTargeting;
         waves [currentWaveNumber].id     = currentWaveNumber;
         currentWaveNumber++;
     }
     else
     {
         this.enabled = false;
     }
 }
Esempio n. 3
0
 public EnemySpawner(WaveProfile toAttach)
 {
     attachProfile(toAttach);
 }