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