Example #1
0
        public void LoadNextScene()
        {
            GameCollection gameCollection = FindObjectOfType <GameCollection>();
            string         nextScene      = gameCollection.GetNextScene();

            // The session contains only 5 games
            if (gameCollection.PlayedGames > 4)
            {
                FindObjectOfType <ActionManager>().GoTo("BaseMenu");

                return;
            }

            SceneManager.LoadScene(nextScene);
        }
Example #2
0
        private void Awake()
        {
            // Remove halted state after every game end
            Time.timeScale = 1f;

            IsSfxMuted = false;

            PlayerPrefs.SetInt("IsMuted", 0);

            IsBgMuted = false;

            PlayerPrefs.SetInt("IsBgMuted", 0);

            _gameCollection = FindObjectOfType <GameCollection>();

            AudioManager.OnAllAudioOverrideEvent += OverrideAudio;
        }