Ejemplo n.º 1
0
 public State(GameScenarioCompiler scenario)
 {
     this.scenario = scenario;
     index         = 0;
     Debug.Assert(scenario.waves.Length > 0, "Empty scenario!");
     wave = scenario.waves[0].Begin();
 }
Ejemplo n.º 2
0
        public bool Progress()
        {
            float deltaTime = wave.Progress(Time.deltaTime);

            while (deltaTime >= 0f)
            {
                if (++index >= scenario.waves.Length)
                {
                    return(false);
                }
                wave      = scenario.waves[index].Begin();
                deltaTime = wave.Progress(deltaTime);
            }
            return(true);
        }