Merge pull request #8312 from imgntn/whiteboard_far_swiper

Make whiteboard marker spawning work with 'far trigger'
This commit is contained in:
James B. Pollack 2016-07-25 17:01:48 -07:00 committed by GitHub
commit 40c24b8cd1

View file

@ -18,11 +18,22 @@
busy: false,
preload: function(entityID) {
this.entityID = entityID;
Entities.editEntity(entityID, {
userData: JSON.stringify({
grabbableKey: {
grabbable: false,
wantsTrigger: true
}
})
});
Script.update.connect(this.update);
},
clickReleaseOnEntity: function() {
this.createSupplies();
},
startFarTrigger: function() {
this.createSupplies();
},
update: function() {
if (_this.busy === true) {
return;
@ -45,7 +56,6 @@
}, 2000)
}
},
createSupplies: function() {
var myProperties = Entities.getEntityProperties(this.entityID);