Skip to content

Instantly share code, notes, and snippets.

@sscholl
Created July 5, 2016 01:25
Show Gist options
  • Save sscholl/640c47fbd4dbfd3994067531dcbfe26c to your computer and use it in GitHub Desktop.
Save sscholl/640c47fbd4dbfd3994067531dcbfe26c to your computer and use it in GitHub Desktop.
Game.loop
console.log('only once!');
var mod = require('mod');
Memory.ticks = 0;
var test = Game.time;
module.exports.loop = function() {
console.log('tick ' + (Memory.ticks ++) + '! (var test = ' + test + ')');
}
console.log('mod: only once!');
module.exports.foo = function() {
console.log('mod: tick!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment