diff --git a/Assets/Src/PlayerData.cs b/Assets/Src/PlayerData.cs index c128c1e..64b6445 100644 --- a/Assets/Src/PlayerData.cs +++ b/Assets/Src/PlayerData.cs @@ -13,6 +13,7 @@ public class PlayerData { public class PlayerSettings { public float ViewSens = 1.0f; public bool InvertY = false; + public bool MuteAudio = false; } public static class PlayerDataService { diff --git a/Assets/Src/ShipControls.cs b/Assets/Src/ShipControls.cs index de96e79..9cd5cc5 100755 --- a/Assets/Src/ShipControls.cs +++ b/Assets/Src/ShipControls.cs @@ -44,6 +44,15 @@ public class ShipControls : MonoBehaviour { } } + bool _muteAudio = false; + public bool MuteAudio { + set { + _muteAudio = value; + AudioListener.volume = _muteAudio ? 0f : 1f; + Debug.Log($"Set muteAudio {_muteAudio}"); + } + } + public PowerUnit powerUnit = new(); public float Speed => rigidBody.velocity.magnitude; diff --git a/Assets/Src/UI/Menu.uxml b/Assets/Src/UI/Menu.uxml index 8d52055..51ca57e 100755 --- a/Assets/Src/UI/Menu.uxml +++ b/Assets/Src/UI/Menu.uxml @@ -1,29 +1,29 @@ - -