User prompt
If cursor touched coin make it rotated by 360° x 2 times.
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
Lower the size of background1 little bit from the top to be below the pause button.
User prompt
Make the coin big a bit
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Make coin 1-7 position code for each
User prompt
Add position of each coin in the code
User prompt
center the coins
User prompt
If i hold on the coin and move the cursor move the coin with it
User prompt
Don't random the coins positions
User prompt
Add drag by click on the coin
User prompt
Add the 7 coins to the game
User prompt
Set the background behind all objects
User prompt
increase size of the coins and make it inside the screen not outside the boundaries.
User prompt
add 7 coins with random position in the screen.
User prompt
Add coin assets to get collected by cursor on the screen
User prompt
if i hold after click then move the cursor draw a line or draw by point continuously.
User prompt
add speed to the point
User prompt
if i hold on the screen and point point. Track the click to put the point.
User prompt
fit it to screen
/**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Create a point asset for the cursor var point = LK.getAsset('point', { anchorX: 0.5, anchorY: 0.5 }); game.addChild(point); // Handle mouse movement // Add background to the game var background = LK.getAsset('Background1', { anchorX: 0.5, anchorY: 0.5, scaleX: 2048 / 1000, scaleY: 2732 / 1000 }); game.addChild(background); background.x = 2048 / 2; background.y = 2732 / 2; game.down = function (x, y, obj) { // Create a new point asset for each click var newPoint = LK.getAsset('point', { anchorX: 0.5, anchorY: 0.5 }); game.addChild(newPoint); // Position the new point asset at the current mouse position newPoint.x = x; newPoint.y = y; // Add speed to the point newPoint.speed = 5; };
===================================================================
--- original.js
+++ change.js
@@ -34,5 +34,7 @@
game.addChild(newPoint);
// Position the new point asset at the current mouse position
newPoint.x = x;
newPoint.y = y;
+ // Add speed to the point
+ newPoint.speed = 5;
};
\ No newline at end of file