pausing with muting

This commit is contained in:
ntr committed 2023-10-10 17:13:58 +11:00
1 parent 6d5fc8a090
commit 1d078569e9
2 files changed
+14

No files matched your search

+12
View File
@@ -49,6 +49,18 @@ public class ShipAudio : MonoBehaviour {
SpaceRaceInput input;
ShipControls ship;
public void MuteShip() {
srcShipDecel.Stop();
srcShipAccel.Stop();
srcShipStrafe.Stop();
}
public void UnmuteShip() {
srcShipDecel.Play();
srcShipAccel.Play();
srcShipStrafe.Play();
}
void Awake() {
for (int i = 0; i < powerUnitClips.Length; i++) {
sounds.Add(powerUnitSounds[i], powerUnitClips[i]);