示例#1
0
        private IEnumerator StartPlaythrough(Playthrough playthrough)
        {
            for (int i = 0; i < playthrough.waves.Length; i++)
            {
                _currentWaveNumber = i;
                StartWave(playthrough.waves[i]);
                yield return(new WaitForSeconds(1));

                while (!IsWaveDone(i))
                {
                    yield return(null);
                }
            }
            LevelManager.Instance.LoadLevel(Level.Win);
        }
示例#2
0
 private void Awake()
 {
     _playthrough  = JsonUtility.FromJson <Playthrough>(playthroughJson.text);
     _instantiator = GetComponent <EnemyInstantiator>();
 }