Add mute option to the game

This commit is contained in:
DArcy Rush
2015-11-14 22:36:41 +00:00
parent 3474da0ecc
commit 67f88e368f
12 changed files with 106 additions and 4 deletions

View File

@@ -114,6 +114,16 @@ namespace OpenRA
soundEngine.StopAllSounds();
}
public void MuteAudio()
{
soundEngine.Volume = 0f;
}
public void UnmuteAudio()
{
soundEngine.Volume = 1f;
}
public ISound Play(string name) { return Play(null, name, true, WPos.Zero, 1f); }
public ISound Play(string name, WPos pos) { return Play(null, name, false, pos, 1f); }
public ISound Play(string name, float volumeModifier) { return Play(null, name, true, WPos.Zero, volumeModifier); }