public void OnMiniGameLoaded(Minigame _minigame) { m_activeMinigame = _minigame; m_activeMinigame.MusicVolume = ClassicMiniGames.MainGameMusicVolume; m_activeMinigame.SFxVolume = ClassicMiniGames.MainGameSFXVolume; m_activeMinigame.ResumeGame(); }
private void Start() { Minigame active = MinigameManager.GetActive(); if (active != null) { active.RegisterMusic(MusicTrack); } }
public void OnDestroy() { Minigame active = MinigameManager.GetActive(); if (active != null && m_registered) { active.UnregisterSFX(this); } }
public void ExitMinigame() { BaseGameController.DestroyInstance(); ClassicMiniGames.AddCoinsToAccount(Instance.PlayerCoins); Instance.PlayerCoins = 0; m_activeMinigame = null; SceneManager.LoadScene("ClassicMiniGames"); Resources.UnloadUnusedAssets(); }
private void RegisterSFXWithManager() { Minigame active = MinigameManager.GetActive(); if (AudioTrack != null && active != null) { active.RegisterSFX(this); m_registered = true; Stop(); } }
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); }
public MinigameManager() { PlayerCoins = 0; m_activeMinigame = null; }