User prompt
make collider around player 70% smaller
User prompt
make collider around player 30% smaller
User prompt
make colliders around obstacles 20% smaller
User prompt
Fix Bug: 'Timeout.tick error: Can't find variable: scoreTxt' in this line: 'scoreTxt.setText(this.score.toString());' Line Number: 34
User prompt
Score should increment with every successful jump
User prompt
Fix Bug: 'Timeout.tick error: Can't find variable: score' in this line: 'score++;' Line Number: 32
User prompt
Fix Bug: 'Timeout.tick error: Can't find variable: score' in this line: 'score++;' Line Number: 32
User prompt
Score should increment by 1 for every successful jump
User prompt
Player should be red
User prompt
Background above ground should be light blue
User prompt
Jump should reach 10% higher
User prompt
Move ground down 100 pixels
User prompt
Decrease ground graphics height by 20%
User prompt
Move ground graphics down 20%
User prompt
Make ground graphics green
User prompt
Move ground graphics down by 20%
User prompt
Move ground graphics down by 50%
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'player.y')' in this line: 'groundGraphics.height = 2732 - player.y;' Line Number: 40
===================================================================
--- original.js
+++ change.js
@@ -28,10 +28,10 @@
if (self.y >= 2000) {
self.y = 2000;
self.rotation = 0;
LK.clearInterval(jumpingInterval);
- score++;
- scoreTxt.setText(score.toString());
+ self.parent.score++;
+ scoreTxt.setText(self.parent.score.toString());
}
}, 21);
}
};
@@ -41,9 +41,9 @@
LK.stageContainer.setBackgroundColor(0xADD8E6);
var player = self.addChild(new Player());
player.x = 200;
player.y = 2000;
- var score = 0;
+ self.score = 0;
var groundGraphics = self.createAsset('ground', 'Ground Graphics', 0, 1);
groundGraphics.width = 2048;
groundGraphics.height = (2732 - player.y) * 0.8;
groundGraphics.y = player.y + groundGraphics.height / 2 + groundGraphics.height * 0.4 + 100;