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