Exemplo n.º 1
0
 // Will probably move to its own component
 void PlayIfCan(Note note)
 {
     if (soundPlayer == null || !soundPlayer.IsPlaying)
     {
         soundPlayer = Sound.Play(note);
     }
 }
Exemplo n.º 2
0
 void PlayImmediatly(IEnumerable <Note> notes)
 {
     if (soundPlayer != null)
     {
         soundPlayer.Stop();
     }
     soundPlayer = Sound.Play(notes);
 }