Code edit (1 edits merged)
Please save this source code
User prompt
update the number of selected cane when player moves : 1 when player y under (1st cane y + 100) 2 when player y under (2nd cane y + 100) 3 when player y under (3rd cane y + 100)
User prompt
add a gui text showing the current number of selected candies
User prompt
Fix Bug: 'ReferenceError: player is not defined' in this line: 'player.y = Math.max(minY, Math.min(maxY, pos.y));' Line Number: 132
User prompt
Fix Bug: 'ReferenceError: computerPlayer is not defined' in this line: 'computerPlayer.update();' Line Number: 125
User prompt
Fix Bug: 'TypeError: self.player is undefined' in this line: 'self.player.visible = playerTurn;' Line Number: 85
User prompt
Fix Bug: 'TypeError: player is undefined' in this line: 'player.visible = playerTurn;' Line Number: 85
User prompt
when playerTurn is true, show the player hide the computer asset; when playerTurn is false, hide the player asset and show the computer asset;
User prompt
add a variable playerTurn with value true
User prompt
limit the player y move from the first to the 3rd candy
User prompt
add the same shadows to the last candy cane
User prompt
create a separated asset and variable for the last stick
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: e is undefined' in this line: 'var pos = obj.event.getLocalPosition(self);' Line Number: 3
User prompt
Fix Bug: 'TypeError: e is undefined' in this line: 'var pos = event.getLocalPosition(self);' Line Number: 3
User prompt
restore the player vertical move following the mouse vertical move
User prompt
restore the player vertical move
User prompt
the player can click anywhere, the selected candy is the closest to the player's y pos
User prompt
handle player's candy selection
User prompt
add a computer player
Code edit (6 edits merged)
Please save this source code
User prompt
clamp player's y move between the first and last candy y
User prompt
make the player follow the mouse y position
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -118,9 +118,9 @@
candyCanes.push(candyCane);
self.addChild(candyCane);
}
var lastCandyCane = new LastCandyCane();
- lastCandyCane.x = 2048 / 2;
+ lastCandyCane.x = 2048 / 2 + 100;
lastCandyCane.y = 250 + 12 * 190;
candyCanes.push(lastCandyCane);
self.addChild(lastCandyCane);
self.player = new Player();
a christmas wooden board Background image. High contrast. No shadows.
a vertical christmas wooden board with snow, and decorations on its sides Background image. High contrast. No shadows.
a photo-realistic white and red vertical candy stick slice Single Game Texture. No background. High contrast. No shadows.
a horizontal santa's arm with a white glove and the index pointing to the right Single Game Texture. No background. High contrast. No shadows.
an green hairy grinch's arm, pointing in the horizontal direction, the index finger pointing to the left Single Game Texture. No background. High contrast. No shadows.
a photo-realistic white and red twisted candy stick slice in vertical position and with an extinguished wick. At its center, a simple white rectangular "TNT" sticker in the same direction as the stick Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a top view of a TNT explosion fire Background image. High contrast. No shadows.
A funny Santa Claus disheveled and covered by black soot after an explosion. stary night. High contrast.
a futuristic white robot arm. horizontal direction. the index finger pointing to the left. Single Game Texture. No background. High contrast. No shadows.
A old super hero Santa Claus holding a candy cane in his hand High contrast.
frame of an empty christmas themed popup with a decorated border User interface
a single mat rounded empty button User interface