Exemple #1
0
 private void Awake()
 {
     _popup = GetComponent <PopupWindow>();
     resumeButton.onClick.AddListener(() => { _popup.Close(); Level.CountdownAfterPause.Start(); });
     restartButton.onClick.AddListener(() => { Level.RecordProgress(); SceneLoader.LoadScene(GameScene.Level); });
     music.IsOn = !MusicMaster.Mute;
     music.onClick.AddListener(value => MusicMaster.Mute = !value);
     sounds.IsOn = !SoundMaster.Mute;
     sounds.onClick.AddListener(value => SoundMaster.Mute = !value);
 }
Exemple #2
0
 private void Awake()
 {
     if (okayButton)
     {
         okayButton.onClick.AddListener(() =>
         {
             CollectItemPopup.Open(_collectedRewards, () =>
             {
                 SceneLoader.LoadScene(GameScene.Pivot, true);
             });
         });
     }
 }
Exemple #3
0
        private static void ClickPlay()
        {
            switch (Game.Mode)
            {
            case GameMode.Rating:
                SceneLoader.LoadScene(GameScene.Level, slowLoad: true);
                break;

            case GameMode.Story:
                SceneLoader.LoadScene(GameScene.Story);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
#pragma warning restore CS0649

        private void Awake()
        {
            retryButton.onClick.AddListener(() => SceneLoader.LoadScene(GameScene.Level));
        }
Exemple #5
0
 private void Awake()
 {
     _button = GetComponent <Button>();
     _button.onClick.AddListener(() => SceneLoader.LoadScene(scene, slowLoad));
 }