Code edit (3 edits merged)
Please save this source code
User prompt
Make it move with drage of background1.
User prompt
Add gate6 to the page1
User prompt
change levels to be pages
Code edit (4 edits merged)
Please save this source code
User prompt
Make the gate5 move with the drag of background1.
User prompt
Add gate5 to level1
Code edit (3 edits merged)
Please save this source code
User prompt
Make gate4 move with background1
User prompt
Add gate4 to level1
Code edit (4 edits merged)
Please save this source code
User prompt
Make gate3 move with background1 when dragging its image.
User prompt
Add gate3 to level1
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Make the gate2 move with the background1
User prompt
Add gate2 to level1
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Make gate1 moved with background1 when drage background1 image from this position.
User prompt
Add gate1 to the level1
User prompt
Add assets gate1 2 3 4 5 6
User prompt
make the image can be dragged by any point in it not just from center of it.
User prompt
Make the Image follow the cursor by click in exact same time
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'getLocalPosition')' in or related to this line: 'var newPosition = self.data.getLocalPosition(self.parent);' Line Number: 77
/**** * Classes ****/ var Level1 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background1' with the anchor point set to 0, 0 var background1 = self.attachAsset('background1', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366, scaleX: 1.5, scaleY: 1.5 }); // Add drag functionality to the background1 image self.down = function (x, y, obj) { self.dragging = true; self.data = obj.data; self.initialClick = { x: x, y: y }; self.offset = { x: background1.x - x, y: background1.y - y }; }; self.up = function () { self.dragging = false; self.data = null; }; self.move = function (x, y, obj) { if (self.dragging) { var dx = x - self.initialClick.x; var dy = y - self.initialClick.y; background1.x = x + self.offset.x; background1.y = y + self.offset.y; self.initialClick = { x: x, y: y }; } }; }); // Create a Level2 class by using the LK expand method to extend Container. var Level2 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background2' with the anchor point set to 0, 0 var background2 = self.attachAsset('background2', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Level3 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background3' with the anchor point set to 0, 0 var background3 = self.attachAsset('background3', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Level4 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background4' with the anchor point set to 0, 0 var background4 = self.attachAsset('background4', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Level5 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background5' with the anchor point set to 0, 0 var background5 = self.attachAsset('background5', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); // Create a Level6 class by using the LK expand method to extend Container. var Level6 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background6' with the anchor point set to 0, 0 var background6 = self.attachAsset('background6', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ //{0.b} //{0.a} //{0.9} //{0.8} //{0.7} //{0.6} //{0.5} //{0.4} //{0.3} //{0.2} //{0.1} var level = game.addChild(new Level1());
===================================================================
--- original.js
+++ change.js
@@ -104,5 +104,16 @@
/****
* Game Code
****/
+//{0.b}
+//{0.a}
+//{0.9}
+//{0.8}
+//{0.7}
+//{0.6}
+//{0.5}
+//{0.4}
+//{0.3}
+//{0.2}
+//{0.1}
var level = game.addChild(new Level1());
\ No newline at end of file
2D wreckage of wood, square, HD colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
House from the front facing the screen with big sign above it have description "SHOP", Hd colors
coin with colors, have "DA", hd colors. have black circles and black line for the "DA", between the 2 circles do small black lines all around. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Modern App Store icon, square with rounded corners, HD colors for a 2d game titled "The Collector" and with the description "about building houses and trees and decorations on a map to make it look like city, which then generate "DA" coins after a countdown timer expires. Players can collect these coins to increase their score, which they can then use to purchase more houses and trees and decorations from the shop button on the middle left side of the screen". with text on the middle top of the banner "the collector"!