mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-09 17:20:34 +02:00
Fix tutorial sounds
This commit is contained in:
parent
7bbf9bebec
commit
dee389e204
1 changed files with 5 additions and 21 deletions
|
@ -175,7 +175,7 @@ function isFunction(functionToCheck) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function playSuccessSound() {
|
function playSuccessSound() {
|
||||||
this.soundInjector = Audio.playSound(successSound, {
|
Audio.playSound(successSound, {
|
||||||
position: MyAvatar.position,
|
position: MyAvatar.position,
|
||||||
volume: 0.7,
|
volume: 0.7,
|
||||||
loop: false
|
loop: false
|
||||||
|
@ -268,11 +268,7 @@ stepRaiseAboveHead.prototype = {
|
||||||
if (MyAvatar.getLeftPalmPosition().y > (MyAvatar.getHeadPosition().y + 0.1)) {
|
if (MyAvatar.getLeftPalmPosition().y > (MyAvatar.getHeadPosition().y + 0.1)) {
|
||||||
Script.clearInterval(this.checkIntervalID);
|
Script.clearInterval(this.checkIntervalID);
|
||||||
this.checkIntervalID = null;
|
this.checkIntervalID = null;
|
||||||
this.soundInjector = Audio.playSound(successSound, {
|
playSuccessSound();
|
||||||
position: defaultTransform.position,
|
|
||||||
volume: 0.7,
|
|
||||||
loop: false
|
|
||||||
});
|
|
||||||
onFinish();
|
onFinish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,11 +355,7 @@ stepNearGrab.prototype = {
|
||||||
if (dist < 0.15) {
|
if (dist < 0.15) {
|
||||||
Script.clearInterval(this.checkCollidesTimer);
|
Script.clearInterval(this.checkCollidesTimer);
|
||||||
this.checkCollidesTimer = null;
|
this.checkCollidesTimer = null;
|
||||||
this.soundInjector = Audio.playSound(successSound, {
|
playSuccessSound();
|
||||||
position: basketPosition,
|
|
||||||
volume: 0.7,
|
|
||||||
loop: false
|
|
||||||
});
|
|
||||||
Script.setTimeout(onHit.bind(this), 1000);
|
Script.setTimeout(onHit.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,11 +431,7 @@ stepFarGrab.prototype = {
|
||||||
print("CHECKING...");
|
print("CHECKING...");
|
||||||
if (Vec3.distance(basketPosition, Entities.getEntityProperties(this.boxID, 'position').position) < 0.2) {
|
if (Vec3.distance(basketPosition, Entities.getEntityProperties(this.boxID, 'position').position) < 0.2) {
|
||||||
Script.clearInterval(checkCollidesTimer);
|
Script.clearInterval(checkCollidesTimer);
|
||||||
this.soundInjector = Audio.playSound(successSound, {
|
playSuccessSound();
|
||||||
position: basketPosition,
|
|
||||||
volume: 0.7,
|
|
||||||
loop: false
|
|
||||||
});
|
|
||||||
Script.setTimeout(onHit.bind(this), 1000);
|
Script.setTimeout(onHit.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,11 +530,7 @@ stepEquip.prototype = {
|
||||||
if (Vec3.distance(basketPosition, Entities.getEntityProperties(ammoIDs[i], 'position').position) < 0.25) {
|
if (Vec3.distance(basketPosition, Entities.getEntityProperties(ammoIDs[i], 'position').position) < 0.25) {
|
||||||
Script.clearInterval(this.checkCollidesTimer);
|
Script.clearInterval(this.checkCollidesTimer);
|
||||||
this.checkCollidesTimer = null;
|
this.checkCollidesTimer = null;
|
||||||
this.soundInjector = Audio.playSound(successSound, {
|
playSuccessSound();
|
||||||
position: basketPosition,
|
|
||||||
volume: 0.7,
|
|
||||||
loop: false
|
|
||||||
});
|
|
||||||
Script.setTimeout(onHit.bind(this), 1000);
|
Script.setTimeout(onHit.bind(this), 1000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue