mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:14:34 +02:00
Merge pull request #8312 from imgntn/whiteboard_far_swiper
Make whiteboard marker spawning work with 'far trigger'
This commit is contained in:
commit
40c24b8cd1
1 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue