Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: starfield.move is not a function' in this line: 'starfield.move();' Line Number: 107
User prompt
Fix Bug: 'TypeError: starfield.move is not a function' in this line: 'starfield.move();' Line Number: 107
Code edit (1 edits merged)
Please save this source code
User prompt
create a new image for a starfield that scrolls down the screen
Code edit (5 edits merged)
Please save this source code
User prompt
make background2 tiled
Code edit (1 edits merged)
Please save this source code
User prompt
make the background scrolling towards the bottom of the screen
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'tileScale')' in this line: 'game.background.tileScale.x = game.width / game.background.width;' Line Number: 51
User prompt
make the background tiled so it fills the background.
Code edit (8 edits merged)
Please save this source code
User prompt
create an asset to set the background called "happyBkg1"
Code edit (1 edits merged)
Please save this source code
User prompt
update code so that heroship follows the pointer
User prompt
Fix Bug: 'TypeError: LK.tween is not a function' in this line: 'LK.tween(self, {' Line Number: 25
User prompt
make it so the heroship moves towards the pointer. tween the position to make the movement smooth.
Initial prompt
Smiley shots
===================================================================
--- original.js
+++ change.js
@@ -36,19 +36,21 @@
};
});
var ScrollingBackground = Container.expand(function () {
var self = Container.call(this);
- this.background1 = self.createAsset('happyBkg1', 'Happy background', 0, 0);
- this.background2 = self.createAsset('happyBkg2', 'Happy background', 0, -2732);
+ this.background2 = self.createAsset('happyBkg2', 'Happy background2', 0, 0);
+ this.background1 = self.createAsset('happyBkg1', 'Happy background1', 0, 0);
this.speed = 1;
this.move = function () {
this.background1.y += this.speed;
- this.background2.y += this.speed;
+ this.background2.y += this.speed * 0.1;
if (this.background1.y >= 2732) {
this.background1.y = -2732;
}
- if (this.background2.y >= 2732) {
- this.background2.y = -2732;
+ if (this.background2.y >= 0) {
+ var newBackground2 = this.createAsset('happyBkg2', 'Happy background2', 0, 0);
+ newBackground2.y = this.background2.y - 2732;
+ this.addChild(newBackground2);
}
};
});
a cute cool looking emoji face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a cute looking heart. bright red.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an evil looking emoji. purple and blue colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a shiny blue cute star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A start button. White on Red.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a grey touchpad. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bright yellow shiny cute star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.