- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGame.js
More file actions
Latest commit
29 lines (17 loc) · 403 Bytes
/
Copy pathGame.js
File metadata and controls
29 lines (17 loc) · 403 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
functionGame(){
}
Game.prototype.init=function(){
this.gameWorld=newGameWorld();
}
Game.prototype.start=function(){
PoolGame.init();
PoolGame.mainLoop();
}
Game.prototype.mainLoop=function(){
Canvas.clear();
PoolGame.gameWorld.update();
PoolGame.gameWorld.draw();
Mouse.reset();
requestAnimationFrame(PoolGame.mainLoop);
}
letPoolGame=newGame();