Ejemplo n.º 1
0
 void Start()
 {
     Level.LevelChanged += OnLevelChanged;
     State.SetGameStatusAsync(GameStatus.Intro).RunWithDelay(.1f); // there was a slightly problem when running with .1f delay. Be aware
     AudioSource.ChangeClip(MenuTrack).Run();
     ScreenFading.Instance.FadeInOut(FadeDirection.Out, 3f).Run();
     Wolves.CollectionChanged += (sender, args) => { WolfNumberChanged?.Invoke(); };
     Wolf.Died += wolf =>
     {
         if (wolf.CompareTag("Player"))
         {
             RestartGame();
         }
     };
 }