Merge pull request #4563 from ericrius1/master

added unload function to lightController.js so light is deleted when it'...
This commit is contained in:
Philip Rosedale 2015-03-31 19:31:38 -07:00
commit 647ad18812

View file

@ -132,7 +132,7 @@
this.updateLightIDInUserData();
} else {
var that = this;
Script.setTimeout(function() { that.maybeUpdateLightIDInUserData() }, 500);
Script.setTimeout(function() { that.maybeUpdateLightIDInUserData() }, 500);
}
}
@ -213,6 +213,10 @@
this.preload = function(entityID) {
this.preOperation(entityID);
};
this.unload = function(){
Entities.deleteEntity(this.lightID);
}
this.clickReleaseOnEntity = function(entityID, mouseEvent) {
this.preOperation(entityID);