BBIY/src/game.js

16 lines
461 B
JavaScript
Raw Normal View History

2022-04-01 17:12:37 -06:00
game.loop = (elapsedTime) => {
game.systems.Render.update(elapsedTime);
2022-04-01 17:12:37 -06:00
requestAnimationFrame(game.loop);
}
2022-04-01 17:12:37 -06:00
game.initialize = () => {
game.entities = {};
game.bigBlue = game.createBigBlue();
game.entities[game.bigBlue.id] = game.bigBlue;
game.bigBlue2 = game.createBigBlue();
game.bigBlue2.components.position = game.components.Position({x: 200, y: 100});
game.entities[game.bigBlue2.id] = game.bigBlue2;
requestAnimationFrame(game.loop);
}