mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
no water sound
This commit is contained in:
parent
451856ae67
commit
bcd8d8fb30
2 changed files with 5 additions and 25 deletions
|
@ -33,9 +33,6 @@
|
|||
max: 1000
|
||||
};
|
||||
_this.canCreateFlower = true;
|
||||
_this.flowersBloomingSound = SoundCache.getSound("https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/flowersBlooming.wav");
|
||||
_this.soundPlaying = false;
|
||||
_this.BLOOM_VOLUME = 0.4;
|
||||
|
||||
};
|
||||
|
||||
|
@ -60,16 +57,7 @@
|
|||
flower.grow();
|
||||
});
|
||||
|
||||
if (!_this.soundPlaying) {
|
||||
_this.position = Entities.getEntityProperties(_this.entityID, "position").position;
|
||||
_this.soundPlaying = true;
|
||||
_this.bloomSoundInjector = Audio.playSound(_this.flowersBloomingSound, {position: _this.position, volume: _this.BLOOM_VOLUME});
|
||||
}
|
||||
},
|
||||
|
||||
stopWatering: function() {
|
||||
_this.bloomSoundInjector.stop();
|
||||
_this.soundPlaying = false;
|
||||
|
||||
},
|
||||
|
||||
createFlower: function(position, surfaceNormal) {
|
||||
|
@ -135,15 +123,7 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
unload: function() {
|
||||
if (_this.bloomSoundInjector) {
|
||||
_this.bloomSoundInjector.stop();
|
||||
delete _this.bloomSoundInjector;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// entity scripts always need to return a newly constructed object of our type
|
||||
|
|
|
@ -129,10 +129,10 @@ var waterSpout = Entities.addEntity({
|
|||
});
|
||||
|
||||
function cleanup() {
|
||||
// Entities.deleteEntity(plant);
|
||||
// Entities.deleteEntity(bowl);
|
||||
// Entities.deleteEntity(waterCan);
|
||||
// Entities.deleteEntity(waterSpout);
|
||||
Entities.deleteEntity(plant);
|
||||
Entities.deleteEntity(bowl);
|
||||
Entities.deleteEntity(waterCan);
|
||||
Entities.deleteEntity(waterSpout);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue