blob: cd82cc0ba658b6f1daa90441d2c730b3ccfbf3df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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;
game.rock = game.createRock();
game.rock.components.position = game.components.Position({x: 200, y: 200});
game.entities[game.rock.id] = game.rock;
requestAnimationFrame(game.loop);
}
|