Пример #1
0
 static MusicSystem()
 {
     MusicDirectory = Path.GetDirectoryName(Application.ExecutablePath) +
                      "\\music\\";
     Volume = 100;
     LastSong = "NONE";
     musicRedirects = new MusicRedirect[2];
     for (int i = 0; i < musicRedirects.Count(); i++)
     {
         musicRedirects[i] = new MusicRedirect();
     }
 }
Пример #2
0
 public static void ChangeSong(string Filename)
 {
     int i1, i2;
     i1 = Switch ? 0 : 1;
     i2 = Switch ? 1 : 0;
     musicRedirects[i1].Stop();
     musicRedirects[i2].Stop();
     musicRedirects[i2] = new MusicRedirect(Filename);
     musicRedirects[i2].Play();
     Switch = !Switch;
     IsPlaying = true;
     if (Filename.ToLower() == "mario game over.ogg")
         musicRedirects[i2].Loop = false;
     LastSong = Filename;
 }