Пример #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>();
 }