Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (19 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: coconut is not defined' in or related to this line: 'scoreTest = "Zone contact = " + zoneIntersectParasol(coconut[i]);' Line Number: 434
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: livesLeftGraphics[i] is undefined' in or related to this line: 'livesLeftGraphics[i].destroy();' Line Number: 264
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Sprite is not a constructor' in or related to this line: 'var newLife = new Sprite('life');' Line Number: 267
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: scor is not defined' in or related to this line: 'scor += 1;' Line Number: 120
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: OptionsZone is undefined' in or related to this line: 'parasol.y = OptionsZone.y - 400;' Line Number: 189
Code edit (1 edits merged)
Please save this source code
Code edit (23 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: abs is not defined' in or related to this line: 'var deltaX = abs(coconuts[i].x - coconuts[i].X1);' Line Number: 307
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.setText(nouveauScore);' Line Number: 214
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -171,24 +171,8 @@
* The left zone: the coconut will bounce to the extrem left.
* The center zone: the coconut will randomly bounce to the left or to the right.
* The right zone: the coconut will bounce to the extrem right.
****/
-var monkey = game.addChild(new Monkey());
-monkey.x = 2048 / 2;
-monkey.y = 200;
-var parasol = game.addChild(new Parasol());
-parasol.x = 2048 / 2;
-var OptionsZone = {
- x: 0,
- y: game.height - ScoreZone.height,
- width: game.width,
- height: 200 * game.height / 2732
-};
-parasol.y = OptionsZone.y - 400;
-var coconuts = [];
-var nombreCoconuts = 1;
-var score = 0;
-var scoreTest = 0;
/****
* Game zones and backgrounds
****/
var ScoreZone = {
@@ -202,9 +186,28 @@
y: ScoreZone.height,
width: game.width,
height: game.height - 2 * ScoreZone.height
};
+var OptionsZone = {
+ x: 0,
+ y: game.height - ScoreZone.height,
+ width: game.width,
+ height: 200 * game.height / 2732
+};
/****
+* Autres
+****/
+var monkey = game.addChild(new Monkey());
+monkey.x = 2048 / 2;
+monkey.y = 200;
+var parasol = game.addChild(new Parasol());
+parasol.x = 2048 / 2;
+parasol.y = OptionsZone.y - 400;
+var coconuts = [];
+var nombreCoconuts = 1;
+var score = 0;
+var scoreTest = 0;
+/****
* Score
****/
var livesLeft = 3;
var scoreTestText = new Text2('0', {