IEnumerator Start() { AudioPlayer.GetComponent <IMusicPlayer>()?.Play(Music.SlowWaveBeat); PlayerIText.TurnOn(LevelStartDelay); yield return(new WaitForSeconds(LevelStartDelay)); PlayerInput.TurnOn(); EnemyCreator.SetEnemyTracker(EnemyTracker); EnemyCreator.TurnOn(DifficultyLevelManager.GetNext()); PlayerLives.Changed += () => { if (PlayerLives == 0) { SceneManager.LoadScene(EndSceneName); } }; StartCoroutine(EnemiesCheck()); }
private void Start() { AudioPlayer.GetComponent <IMusicPlayer>()?.Play(Music.SlowWaveBeat); EnemyCreator.TurnOn(DifficultyLevelManager.GetNext()); }