Skip to content

Instantly share code, notes, and snippets.

@Renddslow
Last active August 12, 2020 18:01
Show Gist options
  • Save Renddslow/8b69b3c556aecbffe117588190e21300 to your computer and use it in GitHub Desktop.
Save Renddslow/8b69b3c556aecbffe117588190e21300 to your computer and use it in GitHub Desktop.
let entities = [
{ id: '<GUID>', components: { attack: createAttackComponent({ ...settings }) } },
]
const systems = {
move: require('./move'),
attack: require('./attack'),
}
const updater = (dt) => {
entities = entities.map(system.move);
entities = entities.map(system.attack);
}
requestNextAnimationFrame(updater);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment