===================================================================
--- original.js
+++ change.js
@@ -78,9 +78,9 @@
var score = 0;
var scoreText = new Text2(score, {
size: 150,
font: "'GillSans-Bold',Impact,'Arial Black',Tahoma",
- fill: "#ffffff"
+ fill: 0xFFFFFF
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
var lanes = [512, 1024, 1536]; // Three lanes for the player to move between
@@ -146,22 +146,20 @@
player._update_migrated();
obstacles.forEach(function (obstacle) {
obstacle._update_migrated();
if (obstacle.y > player.y && !obstacle.passed) {
- score++;
- scoreText.setText(score.toString());
obstacle.passed = true;
}
if (player.intersects(obstacle)) {
- LK.showGameOver(restartGame);
+ score += 6;
+ scoreText.setText(score.toString());
+ obstacle.destroy();
+ obstacles.splice(obstacles.indexOf(obstacle), 1);
}
powers.forEach(function (power) {
power._update_migrated();
if (player.intersects(power)) {
- score += 6;
- scoreText.setText(score.toString());
- power.destroy();
- powers.splice(powers.indexOf(power), 1);
+ LK.showGameOver(restartGame);
}
});
});
}
summoning round blue button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Make an image og a coconut. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Make more variations
Make a banana. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.