private static PlaySong ( Microsoft.Xna.Framework.Media.Song song ) : void | ||
song | Microsoft.Xna.Framework.Media.Song | |
return | void |
public static void Play(Song song) { MediaPlayer._queue.Clear(); MediaPlayer._numSongsInQueuePlayed = 0; MediaPlayer._queue.Add(song); MediaPlayer.PlaySong(song); }
public static void Play(SongCollection collection, int index = 0) { MediaPlayer._queue.Clear(); MediaPlayer._numSongsInQueuePlayed = 0; foreach (Song song in collection) { MediaPlayer._queue.Add(song); } MediaPlayer._queue.ActiveSongIndex = index; MediaPlayer.PlaySong(MediaPlayer._queue.ActiveSong); }