Code edit (7 edits merged)
Please save this source code
User prompt
dont reset the background from start
User prompt
dont reset the background to 0
User prompt
add continous background looping to the bottom of screen
Code edit (3 edits merged)
Please save this source code
User prompt
dont reset the background to 0
Code edit (3 edits merged)
Please save this source code
User prompt
add continous background looping to the top of screen
Code edit (2 edits merged)
Please save this source code
User prompt
add continous background looping to the bottom of screen
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
add continous background looping to the top of screen
User prompt
add continous background looping to the top of screen
User prompt
add loop the background movement to the left of screen
User prompt
add a forward movement to the entire game in a looping with same background
User prompt
add a forward movement to the entire game in a looping background
Code edit (2 edits merged)
Please save this source code
User prompt
scale the bike asset little bit bigger
Code edit (2 edits merged)
Please save this source code
User prompt
change the bike position at bottom center of the screen
Code edit (1 edits merged)
Please save this source code
User prompt
create a class for bike and position it on the center of the screen
User prompt
create a asset and assign as a background for this game
User prompt
remove all code
/**** * Classes ****/ var Background = Container.expand(function () { var self = Container.call(this); var backgroundGraphics = self.attachAsset('background', { anchorX: 0, anchorY: 0 }); self.speed = -2; self.update = function () { self.y += self.speed; if (self.y <= -2732) { self.y = 2732; } }; }); var Bike = Container.expand(function () { var self = Container.call(this); var bikeGraphics = self.attachAsset('bike', { anchorX: 0.5, anchorY: 0.5, scaleX: 3, scaleY: 3 }); }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var background1 = game.addChild(new Background()); var background2 = game.addChild(new Background()); background2.y = 2732; var bike = game.addChild(new Bike()); bike.x = 2048 / 2; bike.y = 2732 - bike.height / 2;
===================================================================
--- original.js
+++ change.js
@@ -10,9 +10,9 @@
self.speed = -2;
self.update = function () {
self.y += self.speed;
if (self.y <= -2732) {
- self.y = 0;
+ self.y = 2732;
}
};
});
var Bike = Container.expand(function () {
sci fi bike with person riding facing right side Single Game Texture. In-Game asset. High contrast. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
sci fi bike with person riding facing right side Single Game Texture. In-Game asset. High contrast.
asteroid falling diffrent colors Single Game Texture. In-Game asset. High contrast. No Background