MusicPlayer: add Enabled bool (defaults to off)
This commit is contained in:
parent
d2d671e24f
commit
7ed2f3ebb6
@ -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…
Reference in New Issue
Block a user