User prompt
Double the size of these numbers.
User prompt
Add +2 text above red apple when collected by red panda
User prompt
A white "+1" should appear above each green apple when the redpanda touches it
User prompt
Add the owl1 sounds to the game.
User prompt
Rename the bamboo asset to red apple asset.
User prompt
When the Bamboo asset is active the red panda asset is can collect it.
User prompt
Please fix the bug: 'TypeError: setTimeout is not a function' in or related to this line: 'setTimeout(function () {' Line Number: 141
User prompt
Give a Bamboo asset for 7 seconds when the red panda asset collect every tenth apples. The Bamboo asset gives double many points as the apple asset.
User prompt
Give a powershield asset for 5 seconds when the red panda asset collect every tenth apples. Superpower asset is break the pumpkin asset that touches this superpower asset.
User prompt
superpower asset is break every pumpkin that touches this superpower asset.
User prompt
GIve the red panda Asset a power shield for 10 seconds when he collect every tenth apples. This power shield can break any pumpkin that touches this shield.
User prompt
GIve the red panda Asset a power shield for 10 seconds when he collect every tenth apples.
User prompt
Give the red panda a superpower.
User prompt
Add Music1 to the game.
User prompt
Add a new moon object to the wallpapper.
User prompt
Add Owl1 Sounds to the game.
User prompt
Add Music1 to the game.
User prompt
Add Music1 to the game.
User prompt
Add Music1 to the game.
User prompt
Add Music1 to the game.
User prompt
Add to the black wallpapper a moonlight.
User prompt
Change the blue colour background to black colour.
User prompt
change the wallappper to night sky
User prompt
Change the wallpapper from black to halloween
Initial prompt
Red panda feeding time
/**** * Classes ****/ // Apple class var Apple = Container.expand(function () { var self = Container.call(this); var appleGraphics = self.attachAsset('apple', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.destroy(); } }; }); // Pumpkin class var Pumpkin = Container.expand(function () { var self = Container.call(this); var pumpkinGraphics = self.attachAsset('pumpkin', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.destroy(); } }; }); // RedApple class var RedApple = Container.expand(function () { var self = Container.call(this); var redAppleGraphics = self.attachAsset('redApple', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.destroy(); } }; }); // Assets will be automatically created and loaded during gameplay // Red Panda class var RedPanda = Container.expand(function () { var self = Container.call(this); var pandaGraphics = self.attachAsset('redPanda', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Red Panda update logic if needed }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background color }); /**** * Game Code ****/ var moon = LK.getAsset('moon', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 300 }); game.addChild(moon); // Play Music1 LK.playMusic('Music1', { loop: true, fade: { start: 0, end: 1, duration: 1000 } }); // Play Owl1 sound LK.getSound('owl1').play(); // Play Owl1 sound LK.getSound('owl1').play(); var redPanda = game.addChild(new RedPanda()); redPanda.x = 2048 / 2; redPanda.y = 2500; var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); var score = 0; var apples = []; var redApples = []; var pumpkins = []; var bamboos = []; var dragNode = null; function handleMove(x, y, obj) { if (dragNode) { dragNode.x = x; dragNode.y = y; } } game.down = function (x, y, obj) { dragNode = redPanda; handleMove(x, y, obj); }; game.up = function (x, y, obj) { dragNode = null; }; game.move = handleMove; game.update = function () { for (var i = apples.length - 1; i >= 0; i--) { if (apples[i].intersects(redPanda)) { score += 1; scoreTxt.setText(score); // Create +1 text var plusOneText = new Text2('+1', { size: 100, fill: "#ffffff" }); plusOneText.anchor.set(0.5, 0.5); plusOneText.x = apples[i].x; plusOneText.y = apples[i].y - 50; game.addChild(plusOneText); // Animate +1 text upwards and fade out LK.setTimeout(function () { plusOneText.y -= 50; plusOneText.alpha = 0; plusOneText.destroy(); }, 1000); apples[i].destroy(); apples.splice(i, 1); if (score % 10 === 0) { var newRedApple = new RedApple(); newRedApple.x = Math.random() * 2048; newRedApple.y = -50; redApples.push(newRedApple); game.addChild(newRedApple); LK.setTimeout(function () { newRedApple.destroy(); }, 7000); } } } for (var i = redApples.length - 1; i >= 0; i--) { if (redApples[i].intersects(redPanda)) { score += 2; scoreTxt.setText(score); // Create +2 text var plusTwoText = new Text2('+2', { size: 100, fill: "#ffffff" }); plusTwoText.anchor.set(0.5, 0.5); plusTwoText.x = redApples[i].x; plusTwoText.y = redApples[i].y - 50; game.addChild(plusTwoText); // Animate +2 text upwards and fade out LK.setTimeout(function () { plusTwoText.y -= 50; plusTwoText.alpha = 0; plusTwoText.destroy(); }, 1000); redApples[i].destroy(); redApples.splice(i, 1); } } for (var j = pumpkins.length - 1; j >= 0; j--) { if (pumpkins[j].intersects(redPanda)) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } } if (LK.ticks % 60 == 0) { var newApple = new Apple(); newApple.x = Math.random() * 2048; newApple.y = -50; apples.push(newApple); game.addChild(newApple); } if (LK.ticks % 120 == 0) { var newPumpkin = new Pumpkin(); newPumpkin.x = Math.random() * 2048; newPumpkin.y = -50; pumpkins.push(newPumpkin); game.addChild(newPumpkin); } };
===================================================================
--- original.js
+++ change.js
@@ -124,9 +124,9 @@
score += 1;
scoreTxt.setText(score);
// Create +1 text
var plusOneText = new Text2('+1', {
- size: 50,
+ size: 100,
fill: "#ffffff"
});
plusOneText.anchor.set(0.5, 0.5);
plusOneText.x = apples[i].x;
@@ -157,9 +157,9 @@
score += 2;
scoreTxt.setText(score);
// Create +2 text
var plusTwoText = new Text2('+2', {
- size: 50,
+ size: 100,
fill: "#ffffff"
});
plusTwoText.anchor.set(0.5, 0.5);
plusTwoText.x = redApples[i].x;
Halloween pumpkin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Apple.
Halloween moonlight. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Give to the red panda a halloween hat.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.