-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98d39fd
commit ab13ab1
Showing
3 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// soundFX.js | ||
// | ||
// Created by Alezia Kurdis,November 10th, 2023. | ||
// Copyright 2023, Overte e.V. | ||
// | ||
// Space portal opening bearch sound. | ||
// | ||
// Distributed under the Apache License, Version 2.0. | ||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | ||
// | ||
(function(){ | ||
|
||
var ROOT = Script.resolvePath('').split("soundFX.js")[0]; | ||
var BREACH_SOUND = ROOT + "breach.mp3"; | ||
var breachSound; | ||
|
||
this.preload = function(entityID) { | ||
breachSound = SoundCache.getSound(BREACH_SOUND); | ||
} | ||
|
||
this.enterEntity = function(entityID) { | ||
var injector = Audio.playSound(breachSound, { | ||
"position": MyAvatar.position, | ||
"loop": false, | ||
"localOnly": true, | ||
"volume": 1 | ||
}); | ||
}; | ||
|
||
this.leaveEntity = function(entityID) { | ||
//do nothing. | ||
}; | ||
|
||
|
||
}) |