Skip to content

Instantly share code, notes, and snippets.

@birarda
Last active January 25, 2017 02:29
Show Gist options
  • Save birarda/58002c5d1e7e1cdd46bc5b4a36d93c84 to your computer and use it in GitHub Desktop.
Save birarda/58002c5d1e7e1cdd46bc5b4a36d93c84 to your computer and use it in GitHub Desktop.
(function() {
return {
preload: function(entityID) {
print("Preload 2: ", entityID);
this.entityID = entityID;
Script.update.connect(this, this.update);
},
unload: function() {
print("Unload 2: ", this.entityID);
Script.update.disconnect(this, this.update);
},
update: function(dt) {
print("Update 2:", this.entityID, this.time);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment