Mute toggling and buttons to interface
This commit is contained in:
parent
8c13c93e2c
commit
b807797015
13 changed files with 736 additions and 2 deletions
|
@ -24,6 +24,28 @@ public class AudioProvider : EntityBase, IAutoRegister
|
|||
|
||||
public bool fastBGM = false;
|
||||
|
||||
public static bool MuteBGM {
|
||||
get {
|
||||
var current = AudioHelper.VolumeLevel(AudioHelper.AudioCategory.Music);
|
||||
if (current == 0) return true;
|
||||
return false;
|
||||
}
|
||||
set {
|
||||
AudioHelper.SetVolume(AudioHelper.AudioCategory.Music, value ? 0f : 0.375f);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool MuteSFX {
|
||||
get {
|
||||
var current = AudioHelper.VolumeLevel(AudioHelper.AudioCategory.Fx);
|
||||
if (current == 0) return true;
|
||||
return false;
|
||||
}
|
||||
set {
|
||||
AudioHelper.SetVolume(AudioHelper.AudioCategory.Fx, value ? 0f : 0.375f);
|
||||
}
|
||||
}
|
||||
|
||||
[ContextMenu("Speedup Music for 5s")]
|
||||
public void SpeedupForFiveSeconds() {
|
||||
Instance.fastBGM = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue