void Awake() { //check if this is the original themesongobj and if not, destroy it if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); audio.enabled = true; muteMusicButtonBool = false; muteMusicButton = "MuteMusicOffButton"; muteEffectsButtonBool = false; muteEffectsButton = "MuteEffectsOffButton"; }
protected override void OnNavigatedTo(NavigationEventArgs e) { Background_Sound.Stop(); Background_Sound.Play(); }
private void Snowdream_MediaEnded(object sender, RoutedEventArgs e) { Background_Sound.Play(); }