Пример #1
0
 public void OnMiniGameLoaded(Minigame _minigame)
 {
     m_activeMinigame             = _minigame;
     m_activeMinigame.MusicVolume = ClassicMiniGames.MainGameMusicVolume;
     m_activeMinigame.SFxVolume   = ClassicMiniGames.MainGameSFXVolume;
     m_activeMinigame.ResumeGame();
 }
Пример #2
0
        private void Start()
        {
            Minigame active = MinigameManager.GetActive();

            if (active != null)
            {
                active.RegisterMusic(MusicTrack);
            }
        }
Пример #3
0
        public void OnDestroy()
        {
            Minigame active = MinigameManager.GetActive();

            if (active != null && m_registered)
            {
                active.UnregisterSFX(this);
            }
        }
Пример #4
0
 public void ExitMinigame()
 {
     BaseGameController.DestroyInstance();
     ClassicMiniGames.AddCoinsToAccount(Instance.PlayerCoins);
     Instance.PlayerCoins = 0;
     m_activeMinigame     = null;
     SceneManager.LoadScene("ClassicMiniGames");
     Resources.UnloadUnusedAssets();
 }
Пример #5
0
        private void RegisterSFXWithManager()
        {
            Minigame active = MinigameManager.GetActive();

            if (AudioTrack != null && active != null)
            {
                active.RegisterSFX(this);
                m_registered = true;
                Stop();
            }
        }
Пример #6
0
        public static Minigame GetActive()
        {
            Minigame minigame = null;

            if (m_instance != null)
            {
                minigame = m_instance.m_activeMinigame;
                if (minigame != null)
                {
                    minigame.MusicVolume = ClassicMiniGames.MainGameMusicVolume;
                    minigame.SFxVolume   = ClassicMiniGames.MainGameSFXVolume;
                }
            }
            return(minigame);
        }
Пример #7
0
 public MinigameManager()
 {
     PlayerCoins      = 0;
     m_activeMinigame = null;
 }