Exemple #1
0
 public State(EnemyWave wave)
 {
     this.wave = wave;
     index     = 0;
     Debug.Assert(wave.spawnSequences.Length > 0, "Empty wave!");
     sequence = wave.spawnSequences[0].Begin();
 }
Exemple #2
0
 public float Progress(float deltaTime)
 {
     deltaTime = sequence.Progress(deltaTime);
     while (deltaTime >= 0f)
     {
         if (++index >= wave.spawnSequences.Length)
         {
             return(deltaTime);
         }
         sequence  = wave.spawnSequences[index].Begin();
         deltaTime = sequence.Progress(deltaTime);
     }
     return(-1f);
 }