Ejemplo n.º 1
0
 public void OnMiniGameLoaded(Minigame _minigame)
 {
     m_activeMinigame             = _minigame;
     m_activeMinigame.MusicVolume = ClassicMiniGames.MainGameMusicVolume;
     m_activeMinigame.SFxVolume   = ClassicMiniGames.MainGameSFXVolume;
     m_activeMinigame.ResumeGame();
 }
Ejemplo n.º 2
0
        private void Start()
        {
            Minigame active = MinigameManager.GetActive();

            if (active != null)
            {
                active.RegisterMusic(MusicTrack);
            }
        }
Ejemplo n.º 3
0
        public void OnDestroy()
        {
            Minigame active = MinigameManager.GetActive();

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

            if (AudioTrack != null && active != null)
            {
                active.RegisterSFX(this);
                m_registered = true;
                Stop();
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 7
0
 public MinigameManager()
 {
     PlayerCoins      = 0;
     m_activeMinigame = null;
 }