Skip to content

Commit

Permalink
Reduced to 1 layer of stars for android
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Feb 21, 2012
1 parent 4a48276 commit 7c33f33
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ var OBJECT_PLAYER = 1,
OBJECT_POWERUP = 16;

var startGame = function() {
Game.setBoard(0,new Starfield(20,0.4,100,true));
Game.setBoard(1,new Starfield(50,0.6,100));
Game.setBoard(2,new Starfield(100,1.0,50));
var ua = navigator.userAgent.toLowerCase();

// Only 1 row of stars
if(ua.match(/Android/)) {
Game.setBoard(0,new Starfield(50,0.6,100,true));
} else {
Game.setBoard(0,new Starfield(20,0.4,100,true));
Game.setBoard(1,new Starfield(50,0.6,100));
Game.setBoard(2,new Starfield(100,1.0,50));
}
Game.setBoard(3,new TitleScreen("Alien Invasion",
"Press fire to start playing",
playGame));
Expand Down

0 comments on commit 7c33f33

Please sign in to comment.