public SpawnStage(int index, List <SpawnWave> waves)
 {
     // initialize
     this.wave  = null;
     this.index = index;
     this.waves = waves;
 }
        public GameObject CreateUnit(SpawnWave wave, Quaternion rotation, Transform parent)
        {
            // create unit
            GameObject instance = wave.CreateUnit(rotation, parent);

            // return instance
            return(instance);
        }
 public void NextWave()
 {
     // check if depleted
     if (IsStageEmpty())
     {
         return;
     }
     // change current wave
     wave = new SpawnWave(waves[index++]);
 }
 // :: class functions
 public void Reset()
 {
     // reset stage
     index = 0;
     wave  = new SpawnWave(waves[0]);
 }
示例#5
0
 public SpawnWave(SpawnWave other) : this(other.rate, other.points)
 {
 }