blob: c1b9c05857d535fde1cde1537eb03c5eef7d33d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
game.loop = (elapsedTime) => {
game.systems.Render.update(elapsedTime);
requestAnimationFrame(game.loop);
}
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);
}
|