content/hifi-content/rebecca/guitar/guitarThatSpawns.js
2022-02-14 02:04:11 +01:00

27 lines
No EOL
751 B
JavaScript

//
// guitarThatSpawns.js
//
// created by Rebecca Stankus on 02/23/18
// Copyright 2018 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 _this = this;
var spawnerScript = Script.require('./guitarSpawner.js');
_this.startNearTrigger = function(){
print("near trigger");
spawnerScript.spawnNew();
};
_this.clickReleaseOnEntity = function(entityID, mouseEvent) { // this is for turning on/off guitar in desktop mode
print("click release");
if (mouseEvent.isLeftButton) {
spawnerScript.spawnNew();
}
};
});