28 lines
No EOL
787 B
JavaScript
28 lines
No EOL
787 B
JavaScript
//
|
|
// Copyright 2016 High Fidelity, Inc.
|
|
//
|
|
//
|
|
// 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 soundURL ='https://hifi-content.s3.amazonaws.com/wadewatts/BTC-alert.mp3';
|
|
var ringSound;
|
|
|
|
this.preload = function(entityID) {
|
|
print("preload("+entityID+")");
|
|
ringSound = SoundCache.getSound(soundURL);
|
|
};
|
|
|
|
this.clickDownOnEntity = function(entityID, mouseEvent) {
|
|
var bellPosition = Entities.getEntityProperties(entityID).position;
|
|
print("clickDownOnEntity()...");
|
|
Audio.playSound(ringSound, {
|
|
position: bellPosition,
|
|
volume: 0.5
|
|
});
|
|
};
|
|
|
|
}) |