29 lines
766 B
JavaScript
Raw Permalink Normal View History

2016-04-25 17:53:10 -07:00
//
// 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(){
2022-08-21 13:35:28 +02:00
var soundURL ='https://content.overte.org/Developer/Tutorials/soundMaker/bell.wav';
2016-04-25 17:53:10 -07:00
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
});
};
})