adding 502 error
This commit is contained in:
21
games/pacman502/js/game.js
Normal file
21
games/pacman502/js/game.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// The main game loop
|
||||
var main = function () {
|
||||
var now = Date.now();
|
||||
var delta = now - then;
|
||||
|
||||
update(delta / 1000);
|
||||
render();
|
||||
|
||||
then = now;
|
||||
|
||||
// Request to do this again ASAP
|
||||
requestAnimationFrame(main);
|
||||
};
|
||||
|
||||
// Cross-browser support for requestAnimationFrame
|
||||
var w = window;
|
||||
requestAnimationFrame = w.requestAnimationFrame || w.webkitRequestAnimationFrame || w.msRequestAnimationFrame || w.mozRequestAnimationFrame;
|
||||
|
||||
// Let's play this game!
|
||||
var then = Date.now();
|
||||
main();
|
||||
Reference in New Issue
Block a user