Commits

Philipp Tiefenbacher  committed 36ebde3 Draft

ship placement centered

  • Participants
  • Parent commits 44a1479

Comments (0)

Files changed (1)

File src/game/CellSpace.js

 		enemy2Dish.randomize(enemyRule.nrStates, 0.01);
 		shipExplosionDish.randomize(shipExplosionRule.nrStates, 0.01);
 
-		var shipX = gameW/zoom, shipY = gameH/zoom;
+		var shipX = gameW/2, shipY = gameH/2;
 		
 		var cnt = 0;
 		var gameLoop = new utils.AnimationLoop(function() {
 			if (keyboard.isPressed(32)) {
 				enemyDish.randomize(enemyRule.nrStates, 0.0004);
 				enemy2Dish.randomize(enemyRule.nrStates, 0.01);
-				shipX = 0.5*gameW/zoom, shipY = 0.5*gameH/zoom;
+				shipX = gameW/2, shipY = gameH/2;
 			}