Browse Source

MusicPlayer: add Enabled bool (defaults to off)

main
Colin McMillen 2 weeks ago
parent
commit
7ed2f3ebb6
  1. 6
      Shared/MusicPlayer.cs

6
Shared/MusicPlayer.cs

@ -4,6 +4,8 @@ using System;
namespace SemiColinGames {
public class MusicPlayer : IDisposable {
public static bool Enabled = false;
private SoundEffectInstance music;
~MusicPlayer() {
@ -34,7 +36,9 @@ namespace SemiColinGames {
}
public void Play() {
music?.Play();
if (Enabled) {
music?.Play();
}
}
}
}
Loading…
Cancel
Save