コード例 #1
0
 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";
 }
コード例 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     Background_Sound.Stop();
     Background_Sound.Play();
 }
コード例 #3
0
 private void Snowdream_MediaEnded(object sender, RoutedEventArgs e)
 {
     Background_Sound.Play();
 }