work with far trigger

This commit is contained in:
James B. Pollack 2016-07-25 11:05:55 -07:00
parent 3c9b9aef4f
commit 708cce64b6

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);