We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2490cd0 commit 0855d7bCopy full SHA for 0855d7b
engine.js
@@ -77,7 +77,8 @@ var Game = new function() {
77
var lastTime = new Date().getTime();
78
var maxTime = 1/30;
79
// Game Loop
80
- this.loop = function(curTime) {
+ this.loop = function() {
81
+ var curTime = new Date().getTime();
82
requestAnimationFrame(Game.loop);
83
var dt = (curTime - lastTime)/1000;
84
if(dt > maxTime) { dt = maxTime; }
game.js
@@ -297,9 +297,7 @@ Explosion.prototype.step = function(dt) {
297
};
298
299
window.addEventListener("load", function() {
300
- setTimeout(function() {
301
- Game.initialize("game",sprites,startGame);
302
- },50);
+ Game.initialize("game",sprites,startGame);
303
});
304
305
0 commit comments