コード例 #1
0
 public SpawnStage(int index, List <SpawnWave> waves)
 {
     // initialize
     this.wave  = null;
     this.index = index;
     this.waves = waves;
 }
コード例 #2
0
        public GameObject CreateUnit(SpawnWave wave, Quaternion rotation, Transform parent)
        {
            // create unit
            GameObject instance = wave.CreateUnit(rotation, parent);

            // return instance
            return(instance);
        }
コード例 #3
0
 public void NextWave()
 {
     // check if depleted
     if (IsStageEmpty())
     {
         return;
     }
     // change current wave
     wave = new SpawnWave(waves[index++]);
 }
コード例 #4
0
 // :: 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)
 {
 }