mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
Play sound when turning camera on
This commit is contained in:
parent
6237b5fc0a
commit
a4d95f9bf8
2 changed files with 6 additions and 0 deletions
BIN
unpublishedScripts/marketplace/spectator-camera/cameraOn.wav
Normal file
BIN
unpublishedScripts/marketplace/spectator-camera/cameraOn.wav
Normal file
Binary file not shown.
|
@ -94,6 +94,11 @@
|
||||||
if (button) {
|
if (button) {
|
||||||
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
||||||
}
|
}
|
||||||
|
Audio.playSound(CAMERA_ON_SOUND, {
|
||||||
|
volume: 0.15,
|
||||||
|
position: cameraPosition,
|
||||||
|
localOnly: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function Name: spectatorCameraOff()
|
// Function Name: spectatorCameraOff()
|
||||||
|
@ -500,6 +505,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// These functions will be called when the script is loaded.
|
// These functions will be called when the script is loaded.
|
||||||
|
var CAMERA_ON_SOUND = SoundCache.getSound(Script.resolvePath("cameraOn.wav"));
|
||||||
startup();
|
startup();
|
||||||
Script.scriptEnding.connect(shutdown);
|
Script.scriptEnding.connect(shutdown);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue