mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 05:56:56 +02:00
moved spraycan into toybox folder, and added spraypaint sound
This commit is contained in:
parent
9818e2549c
commit
c7cb77a6ab
2 changed files with 9 additions and 1 deletions
|
@ -6,6 +6,8 @@
|
|||
GRAB_FRAME_USER_DATA_KEY = "grabFrame";
|
||||
this.userData = {};
|
||||
|
||||
this.spraySound = SoundCache.getSound("https://s3.amazonaws.com/hifi-public/sounds/sprayPaintSound.wav");
|
||||
|
||||
var TIP_OFFSET_Z = 0.14;
|
||||
var TIP_OFFSET_Y = 0.04;
|
||||
|
||||
|
@ -101,12 +103,18 @@
|
|||
},
|
||||
lifetime: 50, //probably wont be holding longer than this straight
|
||||
});
|
||||
|
||||
this.sprayInjector = Audio.playSound(this.spraySound, {
|
||||
position: this.properties.position,
|
||||
volume: 0.1
|
||||
});
|
||||
}
|
||||
|
||||
this.letGo = function() {
|
||||
this.activated = false;
|
||||
Entities.deleteEntity(this.paintStream);
|
||||
this.paintStream = null;
|
||||
this.sprayInjector.stop();
|
||||
}
|
||||
|
||||
this.reset = function() {
|
|
@ -363,7 +363,7 @@ function createDoll(position) {
|
|||
}
|
||||
|
||||
function createSprayCan(position) {
|
||||
var scriptURL = Script.resolvePath("../entityScripts/sprayPaintCan.js");
|
||||
var scriptURL = Script.resolvePath("entityScripts/sprayPaintCan.js");
|
||||
var modelURL = "https://hifi-public.s3.amazonaws.com/eric/models/paintcan.fbx";
|
||||
|
||||
var entity = Entities.addEntity({
|
||||
|
|
Loading…
Reference in a new issue