Last active
January 25, 2017 20:31
-
-
Save huffman/e8e00c85e95e6af79f03e5e3ee1de323 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i = 0; | |
var testProps = {}; | |
var self = null; | |
(function() { | |
return { | |
preload: function(entityID) { | |
self = this; | |
print("Preload 2: ", entityID); | |
this.entityID = entityID; | |
this.intervalID = Script.setInterval(this.update, 1000); | |
}, | |
unload: function() { | |
print("Unload 2: ", this.entityID); | |
Script.clearInterval(this.intervalID); | |
}, | |
update: function(dt) { | |
testProps = { text: i} | |
Entities.editEntity(self.entityID, testProps); | |
i++; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment