Skip to content

Commit

Permalink
Added set timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Apr 13, 2013
1 parent 954aa88 commit 47cdbe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ var loseGame = function() {
playGame));
};

window.addEventListener("load", function() {
Game.initialize("game",sprites,startGame);

});

var Starfield = function(speed,opacity,numStars,clear) {

// Set up the offscreen canvas
Expand Down Expand Up @@ -301,4 +296,10 @@ Explosion.prototype.step = function(dt) {
}
};

window.addEventListener("load", function() {
setTimeout(function() {
Game.initialize("game",sprites,startGame);
},50);
});


2 changes: 1 addition & 1 deletion game.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CACHE MANIFEST

# v1.01
# v1.02
CACHE:
index.html
engine.js
Expand Down

0 comments on commit 47cdbe3

Please sign in to comment.