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