mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
Merge pull request #4563 from ericrius1/master
added unload function to lightController.js so light is deleted when it'...
This commit is contained in:
commit
647ad18812
1 changed files with 5 additions and 1 deletions
|
@ -132,7 +132,7 @@
|
||||||
this.updateLightIDInUserData();
|
this.updateLightIDInUserData();
|
||||||
} else {
|
} else {
|
||||||
var that = this;
|
var that = this;
|
||||||
Script.setTimeout(function() { that.maybeUpdateLightIDInUserData() }, 500);
|
Script.setTimeout(function() { that.maybeUpdateLightIDInUserData() }, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +213,10 @@
|
||||||
this.preload = function(entityID) {
|
this.preload = function(entityID) {
|
||||||
this.preOperation(entityID);
|
this.preOperation(entityID);
|
||||||
};
|
};
|
||||||
|
this.unload = function(){
|
||||||
|
Entities.deleteEntity(this.lightID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.clickReleaseOnEntity = function(entityID, mouseEvent) {
|
this.clickReleaseOnEntity = function(entityID, mouseEvent) {
|
||||||
this.preOperation(entityID);
|
this.preOperation(entityID);
|
||||||
|
|
Loading…
Reference in a new issue