pausing with muting
This commit is contained in:
1 parent
6d5fc8a090
commit
1d078569e9
2 files changed
+14
No files matched your search
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user