Code edit (1 edits merged)
Please save this source code
User prompt
truncate the shadow horizontally
Code edit (23 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (20 edits merged)
Please save this source code
User prompt
make the player follow the mouse y position
User prompt
clamp player's y move between the first and last candy y
Code edit (3 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
add a computer player
User prompt
handle player's candy selection
User prompt
the player can click anywhere, the selected candy is the closest to the player's y pos
User prompt
restore the player vertical move
User prompt
restore the player vertical move following the mouse vertical move
User prompt
Fix Bug: 'TypeError: e is undefined' in this line: 'var pos = event.getLocalPosition(self);' Line Number: 3
User prompt
Fix Bug: 'TypeError: e is undefined' in this line: 'var pos = obj.event.getLocalPosition(self);' Line Number: 3
Code edit (1 edits merged)
Please save this source code
User prompt
create a separated asset and variable for the last stick
User prompt
add the same shadows to the last candy cane
User prompt
limit the player y move from the first to the 3rd candy
User prompt
add a variable playerTurn with value true
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
Fix Bug: 'TypeError: player is undefined' in this line: 'player.visible = playerTurn;' Line Number: 85
User prompt
Fix Bug: 'TypeError: self.player is undefined' in this line: 'self.player.visible = playerTurn;' Line Number: 85
User prompt
Fix Bug: 'ReferenceError: computerPlayer is not defined' in this line: 'computerPlayer.update();' Line Number: 125
console.log('Available filters:', LK);
var Board = Container.expand(function () {
var self = Container.call(this);
var boardGraphics = self.createAsset('board', 'Board', 0.5, 0);
self.width = 1024;
self.height = 2680;
boardGraphics.width = self.width;
boardGraphics.height = 190 * 13;
boardGraphics.y = (self.height - boardGraphics.height) / 2;
boardGraphics.visible = false;
});
var CandyCane = Container.expand(function () {
var self = Container.call(this);
var candyCaneGraphics = self.createAsset('candyCane', 'Candy Cane', .5, .5);
var shadow = new Container();
shadow.createAsset('candyCaneShadow', 'Candy Cane Shadow', 0, 0);
shadow.x = -320;
shadow.y = -50;
shadow.alpha = 0.5;
shadow.width = shadow.width / 2;
self.addChildAt(shadow, 0);
self.pick = function () {
console.log("Picked ", self);
};
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player', .5, .5);
self.pickCandyCane = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var background = self.createAsset('background', 'Game Background', 0.2545, 0.215);
self.addChild(background);
var candyCanes = [];
var players = [];
var currentPlayerIndex = 0;
var board = new Board();
board.x = 2048 / 2;
board.y = 0;
self.addChild(board);
for (var i = 0; i < 13; i++) {
var candyCane = new CandyCane();
candyCane.x = 2048 / 2;
candyCane.y = 250 + i * 190;
candyCanes.push(candyCane);
self.addChild(candyCane);
}
var player = new Player();
player.x = 400;
player.y = 1324;
players.push(player);
self.addChild(player);
LK.on('tick', function () {});
stage.on('down', function (obj) {});
stage.on('up', function (obj) {});
});
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