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