mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 05:16:55 +02:00
remove sounds from bubble
This commit is contained in:
parent
5ab8f19257
commit
3e7cc7d6eb
1 changed files with 3 additions and 16 deletions
|
@ -12,7 +12,7 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
||||||
(function() { << << << < HEAD
|
(function() {
|
||||||
Script.include("../../utilities.js");
|
Script.include("../../utilities.js");
|
||||||
Script.include("../../libraries/utils.js");
|
Script.include("../../libraries/utils.js");
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
this.preload = function(entityID) {
|
this.preload = function(entityID) {
|
||||||
// print('bubble preload')
|
// print('bubble preload')
|
||||||
_this.entityID = entityID;
|
_this.entityID = entityID;
|
||||||
Script.update.connect(_t.internalUpdate);
|
Script.update.connect(_this.internalUpdate);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.internalUpdate = function() {
|
this.internalUpdate = function() {
|
||||||
|
@ -47,24 +47,11 @@
|
||||||
this.unload = function(entityID) {
|
this.unload = function(entityID) {
|
||||||
Script.update.disconnect(this.internalUpdate);
|
Script.update.disconnect(this.internalUpdate);
|
||||||
var position = properties.position;
|
var position = properties.position;
|
||||||
_t.endOfBubble(position);
|
_this.endOfBubble(position);
|
||||||
// print('UNLOAD PROPS' + JSON.stringify(position));
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.endOfBubble = function(position) {
|
this.endOfBubble = function(position) {
|
||||||
|
|
||||||
this.createBurstParticles(position);
|
this.createBurstParticles(position);
|
||||||
this.burstBubbleSound(position);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.burstBubbleSound = function(position) {
|
|
||||||
var audioOptions = {
|
|
||||||
volume: 0.5,
|
|
||||||
position: position
|
|
||||||
}
|
|
||||||
Audio.playSound(POP_SOUNDS[randInt(0, 4)], audioOptions);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.createBurstParticles = function(position) {
|
this.createBurstParticles = function(position) {
|
||||||
|
|
Loading…
Reference in a new issue