Skip to content

Instantly share code, notes, and snippets.

@AGoblinKing
Created January 7, 2015 00:18
Show Gist options
  • Save AGoblinKing/0c7442d30ede8fe85143 to your computer and use it in GitHub Desktop.
Save AGoblinKing/0c7442d30ede8fe85143 to your computer and use it in GitHub Desktop.
data.components.reduce(function(prev, componentPath) {
Vx.Loaders.script(componentPath, prev);
return prev;
}, function() {
if(++loaded >= toLoad) {
// Components ready
world.state = 1;
// Entities ready
this.readyListeners.forEach(function(fn) {
fn(world);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment