2022-04-01 17:12:37 -06:00
|
|
|
game.loop = (elapsedTime) => {
|
|
|
|
game.systems.Render.update(elapsedTime);
|
2022-03-27 02:17:26 -06:00
|
|
|
|
2022-04-01 17:12:37 -06:00
|
|
|
requestAnimationFrame(game.loop);
|
|
|
|
}
|
2022-03-27 02:17:26 -06:00
|
|
|
|
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;
|
2022-04-01 17:49:20 -06:00
|
|
|
|
|
|
|
game.rock = game.createRock();
|
|
|
|
game.rock.components.position = game.components.Position({x: 200, y: 200});
|
|
|
|
game.entities[game.rock.id] = game.rock;
|
|
|
|
|
2022-04-01 17:12:37 -06:00
|
|
|
requestAnimationFrame(game.loop);
|
2022-03-27 02:17:26 -06:00
|
|
|
}
|