Last active
August 12, 2020 18:01
-
-
Save Renddslow/8b69b3c556aecbffe117588190e21300 to your computer and use it in GitHub Desktop.
This file contains 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
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