===================================================================
--- original.js
+++ change.js
@@ -121,15 +121,8 @@
fill: "#ffffff"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
-function spawnObstacle() {
- var obstacle = new Obstacle();
- obstacle.x = 2048 + obstacle.width / 2;
- obstacle.y = Math.random() * (2732 - obstacle.height) + obstacle.height / 2;
- obstacles.push(obstacle);
- game.addChild(obstacle);
-}
function spawnCoin() {
var coin = new Coin();
coin.x = 2048 + coin.width / 2;
coin.y = Math.random() * (2732 - coin.height) + coin.height / 2;
@@ -167,9 +160,8 @@
coins.splice(j, 1);
}
}
if (LK.ticks % 120 == 0) {
- spawnObstacle();
var upsideObstacle = new UpsideObstacle();
upsideObstacle.x = 2048 + upsideObstacle.width / 2;
upsideObstacle.y = Math.random() * (2732 / 2 - upsideObstacle.height / 2);
obstacles.push(upsideObstacle);