User prompt
corrige el margen top de los cosmetics para que sean similares
User prompt
margen top cosmetic10->14 =150
Code edit (2 edits merged)
Please save this source code
User prompt
arregla el margen top de linea 3 para que el margen top sea igual al margen top de fila 2
Code edit (1 edits merged)
Please save this source code
User prompt
arregla el bug que hace que cosmetic8 6 9 no se habiliten cuando se cumplen los requisitos
Code edit (1 edits merged)
Please save this source code
User prompt
actualiza "var rock = [] hasta Rock14
User prompt
Please fix the bug: 'CosmeticUseEnable14 is not defined' in or related to this line: 'var cosmeticText14 = new Text2(CosmeticUseEnable14 ? 'Enabled' : 'Disabled', {' Line Number: 529
User prompt
Please fix the bug: 'CosmeticUseEnable13 is not defined' in or related to this line: 'var cosmeticText13 = new Text2(CosmeticUseEnable13 ? 'Enabled' : 'Disabled', {' Line Number: 511
User prompt
Please fix the bug: 'CosmeticUseEnable12 is not defined' in or related to this line: 'var cosmeticText12 = new Text2(CosmeticUseEnable12 ? 'Enabled' : 'Disabled', {' Line Number: 493
User prompt
Please fix the bug: 'CosmeticUseEnable11 is not defined' in or related to this line: 'var cosmeticText11 = new Text2(CosmeticUseEnable11 ? 'Enabled' : 'Disabled', {' Line Number: 475
User prompt
Please fix the bug: 'CosmeticUseEnable10 is not defined' in or related to this line: 'var cosmeticText10 = new Text2(CosmeticUseEnable10 ? 'Enabled' : 'Disabled', {' Line Number: 457
User prompt
cuando roque cosmetic10 me agrege la skin Rock10 y no Rock9
User prompt
cosmetic 10 aún proporciona el cosmetico de 9
User prompt
por algun motivo cosmetic10 & 11 proporcionan el cosmetico de cosmetic8 & 9, arreglalo para que sea la skin correcta
Code edit (4 edits merged)
Please save this source code
User prompt
haz que cuando clicke me de 1000 monedas
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'player.playerGraphics = player.attachAsset(rock[index], {' Line Number: 624
Code edit (1 edits merged)
Please save this source code
User prompt
la fila 3 no proporcionan la skin correspondiente a su id
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'CosmeticUseEnable14 is not defined' in or related to this line: 'var cosmeticText14 = new Text2(CosmeticUseEnable14 ? 'Enabled' : 'Disabled', {' Line Number: 529
User prompt
Please fix the bug: 'CosmeticUseEnable13 is not defined' in or related to this line: 'var cosmeticText13 = new Text2(CosmeticUseEnable13 ? 'Enabled' : 'Disabled', {' Line Number: 511
/**** * Plugins ****/ var storage = LK.import("@upit/storage.v1", { meters: 0, money: 0, spin: 0 }); /**** * Classes ****/ // Create a Player class var Player = Container.expand(function () { var self = Container.call(this); // Create a list named 'rock' and add the 'Rock0' asset to it var rock = ['Rock0', 'Rock1', 'Rock2', 'Rock3', 'Rock4', 'Rock5', 'Rock6', 'Rock7', 'Rock8', 'Rock9', 'Rock10', 'Rock11', 'Rock12', 'Rock13', 'Rock14']; // Attach a shape asset to represent the player self.playerGraphics = self.attachAsset(rock[0], { anchorX: 0.5, anchorY: 0.5 }); // Set player speed self.speed = 5; // This is automatically called every game tick, if the player is attached! self.update = function () { self.y += self.speed; // Add gravity to the player if (self.y < ground.y - self.height / 2 + 50) { self.speed += 0.5; } else { self.speed = 0; self.y = ground.y - self.height / 2 + 50; // Ensure player lands correctly jump = 2; // Reset jump count when player lands } // Add rotation to the player self.rotation += 0.05; // Play or pause rockmovement sound based on rock's position if (self.y < ground.y - self.height / 2 + 50) { LK.getSound('rockmovement').stop(); // Stop sound when rock is in the air self.lastWasOnGround = false; // Track if the rock was on the ground } else { if (!self.lastWasOnGround) { LK.getSound('rockFall').play(); // Play rockfall sound when rock lands LK.setTimeout(function () { LK.getSound('rockmovement').play({ loop: true }); // Play sound when rock is on the ground after rockfall }, 100); // Delay rockmovement sound by 100ms after rockfall } else { LK.getSound('rockmovement').play({ loop: true }); // Ensure rockmovement sound loops continuously } self.lastWasOnGround = true; // Update the state to indicate rock is on the ground } }; }); // Create a GirosText class to display the number of 'giros' var GirosText = Text2.expand(function () { var self = Text2.call(this, '0', { size: 100, fill: 0xFFFFFF }); self.update = function () { self.setText('Spins: ' + spin); }; }); // Create a GirosText instance and add it to the game // Create a Text class to display the meters covered var MeterText = Text2.expand(function () { var self = Text2.call(this, '0', { size: 100, fill: 0xFFFFFF }); self.update = function () { self.setText('Meters: ' + meters); }; }); // Create a MoneyText class to display the amount of 'money' var MoneyText = Text2.expand(function () { var self = Text2.call(this, '0', { size: 100, fill: 0xFFFFFF }); self.update = function () { self.setText('Money: ' + money); }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ function updateCosmeticUseEnable() { // Check and update each cosmetic use enable condition if (meters >= 500 && !CosmeticUseEnable2) { CosmeticUseEnable2 = true; updateCosmeticText(); } if (meters >= 1000 && !CosmeticUseEnable3) { CosmeticUseEnable3 = true; updateCosmeticText(); } if (spin === 700 && !CosmeticUseEnable4) { CosmeticUseEnable4 = true; updateCosmeticText(); } if (spin === 800 && !CosmeticUseEnable5) { CosmeticUseEnable5 = true; updateCosmeticText(); } if (spin >= 1000 && !CosmeticUseEnable6) { CosmeticUseEnable6 = true; updateCosmeticText(); } if (money === 300 && !CosmeticUseEnable7) { CosmeticUseEnable7 = true; updateCosmeticText(); } } var CosmeticUseEnable0 = storage.CosmeticUseEnable0 !== undefined ? storage.CosmeticUseEnable0 : true; var CosmeticUseEnable1 = storage.CosmeticUseEnable1 !== undefined ? storage.CosmeticUseEnable1 : true; var CosmeticUseEnable2 = storage.CosmeticUseEnable2 !== undefined ? storage.CosmeticUseEnable2 : false; var CosmeticUseEnable3 = storage.CosmeticUseEnable3 !== undefined ? storage.CosmeticUseEnable3 : false; var CosmeticUseEnable4 = storage.CosmeticUseEnable4 !== undefined ? storage.CosmeticUseEnable4 : false; var CosmeticUseEnable5 = storage.CosmeticUseEnable5 !== undefined ? storage.CosmeticUseEnable5 : false; var CosmeticUseEnable6 = storage.CosmeticUseEnable6 !== undefined ? storage.CosmeticUseEnable6 : false; var CosmeticUseEnable7 = storage.CosmeticUseEnable7 !== undefined ? storage.CosmeticUseEnable7 : false; var CosmeticUseEnable8 = storage.CosmeticUseEnable8 !== undefined ? storage.CosmeticUseEnable8 : false; var CosmeticUseEnable9 = storage.CosmeticUseEnable9 !== undefined ? storage.CosmeticUseEnable9 : false; var CosmeticUseEnable10 = storage.CosmeticUseEnable10 !== undefined ? storage.CosmeticUseEnable10 : true; var CosmeticUseEnable11 = storage.CosmeticUseEnable11 !== undefined ? storage.CosmeticUseEnable11 : true; var CosmeticUseEnable12 = storage.CosmeticUseEnable12 !== undefined ? storage.CosmeticUseEnable12 : true; var CosmeticUseEnable13 = storage.CosmeticUseEnable13 !== undefined ? storage.CosmeticUseEnable13 : true; var CosmeticUseEnable14 = storage.CosmeticUseEnable14 !== undefined ? storage.CosmeticUseEnable14 : true; var currentRockIndex = storage.currentRockIndex || 0; // Load saved background skin index or default to 0 var meters = storage.meters || 0; // Load saved meters or default to 0 var spin = storage.spin || 0; // Load saved spin or default to 0 var money = storage.money || 0; // Load saved money or default to 0 // Initialize a rock asset with a design var rock = LK.getAsset('Rock0', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); game.addChild(rock); // Make the rock jump when the screen is touched game.down = function (x, y, obj) { if (jump > 0 && y < 2732 / 2 + 200) { LK.getSound('rockjump').play(); // Play rockjump sound when the rock jumps player.speed = -18; // Give an initial upward speed for the jump player.y -= 10; // Adjust position slightly to ensure jump effect player.update(); // Ensure the update method is called to apply the jump jump--; // Decrease jump count } }; // Create a background asset using the saved skin index var background = LK.getAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); // Add the background to the game game.addChild(background); // Create a clone of the background asset var backgroundClone = LK.getAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 + background.width, y: 2732 / 2 }); // Add the clone to the game game.addChild(backgroundClone); // Create a second clone of the background asset var backgroundClone2 = LK.getAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 + 2 * background.width, y: 2732 / 2 }); // Add the second clone to the game game.addChild(backgroundClone2); // Initialize a ground asset var ground = LK.getAsset('ground', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, width: background.width, alpha: 0 }); // Add the ground to the game game.addChild(ground); // Create a player instance and add it to the game var player = game.addChild(new Player()); // Position player more towards the center of the screen player.x = 2048 / 4; player.y = 2732 / 2 + 10; // Initialize a variable to track 'meters' // Initialize a variable to track available jumps var jump = 2; // Initialize a variable to track 'giros' // Create a MeterText instance and add it to the game var meterText = game.addChild(new MeterText()); // Position MeterText at the top left of the screen, a bit lower meterText.x = 50; meterText.y = 200; // Create a GirosText instance and add it to the game var moneyText = game.addChild(new MoneyText()); // Position MoneyText below the GirosText moneyText.x = 50; moneyText.y = 400; // Initialize a variable to track 'money' // Create a list named 'rock' and add all the 'rock<number>' assets to it // Ensure rock array is initialized with all rock assets var rock = ['Rock0', 'Rock1', 'Rock2', 'Rock3', 'Rock4', 'Rock5', 'Rock6', 'Rock7', 'Rock8', 'Rock9', 'Rock10', 'Rock11', 'Rock12', 'Rock13', 'Rock14']; // Create a list named 'SkinSelect' var SkinSelect = []; var cosmeticAsset = LK.getAsset('Rock0', { anchorX: 0.5, anchorY: 0.5, x: 200, y: 3580 / 2 }); game.addChild(cosmeticAsset); var cosmeticText0; // Declare variable // Initialize cosmeticText0 after ensuring it's defined cosmeticText0 = new Text2(CosmeticUseEnable0 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable0 ? 0x00FF00 : 0xFF0000 }); cosmeticText0.x = cosmeticAsset.x; cosmeticText0.y = cosmeticAsset.y + 50; game.addChild(cosmeticText0); if (CosmeticUseEnable0) { SkinSelect.push(cosmeticAsset); } var cosmetic1 = LK.getAsset('Rock1', { anchorX: 0.5, anchorY: 0.5, x: cosmeticAsset.x + 400, y: cosmeticAsset.y }); game.addChild(cosmetic1); var cosmeticText1 = new Text2(CosmeticUseEnable1 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable1 ? 0x00FF00 : 0xFF0000 }); cosmeticText1.x = cosmetic1.x; cosmeticText1.y = cosmetic1.y + 50; game.addChild(cosmeticText1); if (CosmeticUseEnable1) { SkinSelect.push(cosmetic1); } var cosmetic2 = LK.getAsset('Rock2', { anchorX: 0.5, anchorY: 0.5, x: cosmetic1.x + 400, y: cosmetic1.y }); game.addChild(cosmetic2); var cosmeticText2 = new Text2(CosmeticUseEnable2 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable2 ? 0x00FF00 : 0xFF0000 }); cosmeticText2.x = cosmetic2.x; cosmeticText2.y = cosmetic2.y + 50; game.addChild(cosmeticText2); if (CosmeticUseEnable2) { SkinSelect.push(cosmetic2); } var cosmetic3 = LK.getAsset('Rock3', { anchorX: 0.5, anchorY: 0.5, x: cosmetic2.x + 400, y: cosmetic2.y }); game.addChild(cosmetic3); var cosmeticText3; // Declare variable // Initialize cosmeticText3 after ensuring it's defined cosmeticText3 = new Text2(CosmeticUseEnable3 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable3 ? 0x00FF00 : 0xFF0000 }); cosmeticText3.x = cosmetic3.x; cosmeticText3.y = cosmetic3.y + 50; game.addChild(cosmeticText3); if (CosmeticUseEnable3) { SkinSelect.push(cosmetic3); } var cosmetic4 = LK.getAsset('Rock4', { anchorX: 0.5, anchorY: 0.5, x: cosmetic3.x + 400, y: cosmetic3.y }); game.addChild(cosmetic4); var cosmeticText4 = new Text2(CosmeticUseEnable4 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable4 ? 0x00FF00 : 0xFF0000 }); cosmeticText4.x = cosmetic4.x; cosmeticText4.y = cosmetic4.y + 50; game.addChild(cosmeticText4); if (CosmeticUseEnable4) { SkinSelect.push(cosmetic4); } var cosmetic5 = LK.getAsset('Rock5', { anchorX: 0.5, anchorY: 0.5, x: cosmeticAsset.x, y: cosmeticAsset.y + 300 }); game.addChild(cosmetic5); var cosmeticText5 = new Text2(CosmeticUseEnable5 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable5 ? 0x00FF00 : 0xFF0000 }); cosmeticText5.x = cosmetic5.x; cosmeticText5.y = cosmetic5.y + 50; game.addChild(cosmeticText5); if (CosmeticUseEnable5) { SkinSelect.push(cosmetic5); } var cosmetic6 = LK.getAsset('Rock6', { anchorX: 0.5, anchorY: 0.5, x: cosmetic5.x + 400, y: cosmetic5.y }); game.addChild(cosmetic6); var cosmeticText6 = new Text2(CosmeticUseEnable6 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable6 ? 0x00FF00 : 0xFF0000 }); cosmeticText6.x = cosmetic6.x; cosmeticText6.y = cosmetic6.y + 50; game.addChild(cosmeticText6); if (CosmeticUseEnable6) { SkinSelect.push(cosmetic6); } var cosmetic7 = LK.getAsset('Rock7', { anchorX: 0.5, anchorY: 0.5, x: cosmetic6.x + 400, y: cosmetic6.y }); game.addChild(cosmetic7); var cosmeticText7 = new Text2(CosmeticUseEnable7 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable7 ? 0x00FF00 : 0xFF0000 }); cosmeticText7.x = cosmetic7.x; cosmeticText7.y = cosmetic7.y + 50; game.addChild(cosmeticText7); if (CosmeticUseEnable7) { SkinSelect.push(cosmetic7); } var cosmetic8 = LK.getAsset('Rock8', { anchorX: 0.5, anchorY: 0.5, x: cosmetic7.x + 400, y: cosmetic7.y }); game.addChild(cosmetic8); var cosmeticText8 = new Text2(CosmeticUseEnable8 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable8 ? 0x00FF00 : 0xFF0000 }); cosmeticText8.x = cosmetic8.x; cosmeticText8.y = cosmetic8.y + 50; game.addChild(cosmeticText8); if (CosmeticUseEnable8) { SkinSelect.push(cosmetic8); } var cosmetic9 = LK.getAsset('Rock9', { anchorX: 0.5, anchorY: 0.5, x: cosmetic8.x + 400, y: cosmetic8.y }); game.addChild(cosmetic9); var cosmeticText9; // Declare variable // Initialize cosmeticText9 after ensuring it's defined cosmeticText9 = new Text2(CosmeticUseEnable9 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable9 ? 0x00FF00 : 0xFF0000 }); cosmeticText9.x = cosmetic9.x; cosmeticText9.y = cosmetic9.y + 50; game.addChild(cosmeticText9); if (CosmeticUseEnable9) { SkinSelect.push(cosmetic9); } var cosmetic10 = LK.getAsset('Rock10', { anchorX: 0.5, anchorY: 0.5, x: cosmetic5.x, y: cosmetic5.y + 350 }); game.addChild(cosmetic10); var cosmeticText10 = new Text2(CosmeticUseEnable10 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable10 ? 0x00FF00 : 0xFF0000 }); cosmeticText10.x = cosmetic10.x; cosmeticText10.y = cosmetic10.y + 50; game.addChild(cosmeticText10); if (CosmeticUseEnable10) { SkinSelect.push(cosmetic10); } var cosmetic11 = LK.getAsset('Rock11', { anchorX: 0.5, anchorY: 0.5, x: cosmetic10.x + 400, y: cosmetic10.y }); game.addChild(cosmetic11); var cosmeticText11 = new Text2(CosmeticUseEnable11 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable11 ? 0x00FF00 : 0xFF0000 }); cosmeticText11.x = cosmetic11.x; cosmeticText11.y = cosmetic11.y + 50; game.addChild(cosmeticText11); if (CosmeticUseEnable11) { SkinSelect.push(cosmetic11); } var cosmetic12 = LK.getAsset('Rock12', { anchorX: 0.5, anchorY: 0.5, x: cosmetic11.x + 400, y: cosmetic11.y }); game.addChild(cosmetic12); var cosmeticText12 = new Text2(CosmeticUseEnable12 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable12 ? 0x00FF00 : 0xFF0000 }); cosmeticText12.x = cosmetic12.x; cosmeticText12.y = cosmetic12.y + 50; game.addChild(cosmeticText12); if (CosmeticUseEnable12) { SkinSelect.push(cosmetic12); } var cosmetic13 = LK.getAsset('Rock13', { anchorX: 0.5, anchorY: 0.5, x: cosmetic12.x + 400, y: cosmetic12.y }); game.addChild(cosmetic13); var cosmeticText13 = new Text2(CosmeticUseEnable13 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable13 ? 0x00FF00 : 0xFF0000 }); cosmeticText13.x = cosmetic13.x; cosmeticText13.y = cosmetic13.y + 50; game.addChild(cosmeticText13); if (CosmeticUseEnable13) { SkinSelect.push(cosmetic13); } var cosmetic14 = LK.getAsset('Rock14', { anchorX: 0.5, anchorY: 0.5, x: cosmetic13.x + 400, y: cosmetic13.y }); game.addChild(cosmetic14); var cosmeticText14 = new Text2(CosmeticUseEnable14 ? 'Enabled' : 'Disabled', { size: 50, fill: CosmeticUseEnable14 ? 0x00FF00 : 0xFF0000 }); cosmeticText14.x = cosmetic14.x; cosmeticText14.y = cosmetic14.y + 50; game.addChild(cosmeticText14); if (CosmeticUseEnable14) { SkinSelect.push(cosmetic14); } var assets = LK.assets; if (assets) { for (var i = 0; i < assets.length; i++) { if (assets[i].id.startsWith('Rock')) { rock.push(assets[i].id); } } rock.sort(function (a, b) { return parseInt(a.replace('Rock', '')) - parseInt(b.replace('Rock', '')); }); } var girosText = game.addChild(new GirosText()); // Position GirosText below the MeterText, also a bit lower girosText.x = 50; girosText.y = 300; function updateCosmeticText() { if (cosmeticText0) { cosmeticText0.setText(CosmeticUseEnable0 ? 'Enabled' : 'Disabled'); if (cosmeticText0.style) { cosmeticText0.style.fill = CosmeticUseEnable0 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText1) { cosmeticText1.setText(CosmeticUseEnable1 ? 'Enabled' : 'Disabled'); if (cosmeticText1.style) { cosmeticText1.style.fill = CosmeticUseEnable1 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText2) { cosmeticText2.setText(CosmeticUseEnable2 ? 'Enabled' : 'Disabled'); if (cosmeticText2.style) { cosmeticText2.style.fill = CosmeticUseEnable2 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText3) { cosmeticText3.setText(CosmeticUseEnable3 ? 'Enabled' : 'Disabled'); if (cosmeticText3.style) { cosmeticText3.style.fill = CosmeticUseEnable3 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText4) { cosmeticText4.setText(CosmeticUseEnable4 ? 'Enabled' : 'Disabled'); if (cosmeticText4.style) { cosmeticText4.style.fill = CosmeticUseEnable4 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText5) { cosmeticText5.setText(CosmeticUseEnable5 ? 'Enabled' : 'Disabled'); if (cosmeticText5.style) { cosmeticText5.style.fill = CosmeticUseEnable5 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText6) { cosmeticText6.setText(CosmeticUseEnable6 ? 'Enabled' : 'Disabled'); if (cosmeticText6.style) { cosmeticText6.style.fill = CosmeticUseEnable6 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText7) { cosmeticText7.setText(CosmeticUseEnable7 ? 'Enabled' : 'Disabled'); if (cosmeticText7.style) { cosmeticText7.style.fill = CosmeticUseEnable7 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText8) { cosmeticText8.setText(CosmeticUseEnable8 ? 'Enabled' : 'Disabled'); if (cosmeticText8.style) { cosmeticText8.style.fill = CosmeticUseEnable8 ? 0x00FF00 : 0xFF0000; } } if (cosmeticText9) { cosmeticText9.setText(CosmeticUseEnable9 ? 'Enabled' : 'Disabled'); if (cosmeticText9.style) { cosmeticText9.style.fill = CosmeticUseEnable9 ? 0x00FF00 : 0xFF0000; } } } game.update = function () { updateCosmeticText(); // Make each item in SkinSelect interactable SkinSelect.forEach(function (item, index) { item.down = function (x, y, obj) { // Change the player's rock based on the item number player.removeChild(player.playerGraphics); player.playerGraphics = player.attachAsset(rock[index], { anchorX: 0.5, anchorY: 0.5 }); // Remove jump effect when items are touched }; }); // Continuously check and update CosmeticUseEnable updateCosmeticUseEnable(); background.x -= 5; backgroundClone.x -= 5; backgroundClone2.x -= 5; if (background.x + background.width < 0) { background.x = backgroundClone2.x + background.width; } if (backgroundClone.x + backgroundClone.width < 0) { backgroundClone.x = background.x + background.width; } if (backgroundClone2.x + backgroundClone2.width < 0) { backgroundClone2.x = backgroundClone.x + backgroundClone.width; } // Increment 'meters' every second if (LK.ticks % 60 == 0) { meters += 1; // Log every time 250 meters are advanced if (meters % 250 === 0) { console.log('Advanced 250 meters'); // Play the 'HoundreMeters' sound every 250 meters LK.getSound('HoundreMeters').play(); money += 25; // Increase 'money' by 25 // Change background sprite currentRockIndex = (currentRockIndex + 1) % 8; // Cycle through 0 to 7 background.removeChild(background.playerGraphics); background.playerGraphics = background.attachAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5 }); backgroundClone.removeChild(backgroundClone.playerGraphics); backgroundClone.playerGraphics = backgroundClone.attachAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5 }); backgroundClone2.removeChild(backgroundClone2.playerGraphics); backgroundClone2.playerGraphics = backgroundClone2.attachAsset('Background' + currentRockIndex, { anchorX: 0.5, anchorY: 0.5 }); } // Play the 'HoundreMeters' sound at 250 meters if (meters === 250) { LK.getSound('HoundreMeters').play(); } } // Save progress every 1 second if (LK.ticks % 60 == 0) { storage.meters = meters; storage.money = money; storage.spin = spin; storage.currentRockIndex = currentRockIndex; // Save current background skin index storage.CosmeticUseEnable0 = CosmeticUseEnable0; storage.CosmeticUseEnable1 = CosmeticUseEnable1; storage.CosmeticUseEnable2 = CosmeticUseEnable2; storage.CosmeticUseEnable3 = CosmeticUseEnable3; storage.CosmeticUseEnable4 = CosmeticUseEnable4; storage.CosmeticUseEnable5 = CosmeticUseEnable5; storage.CosmeticUseEnable6 = CosmeticUseEnable6; storage.CosmeticUseEnable7 = CosmeticUseEnable7; storage.CosmeticUseEnable8 = CosmeticUseEnable8; storage.CosmeticUseEnable9 = CosmeticUseEnable9; } // Increment 'giros' every 2.09 seconds if (LK.ticks % Math.round(2.09 * 60) == 0) { spin += 1; } };
===================================================================
--- original.js
+++ change.js
@@ -238,9 +238,9 @@
size: 50,
fill: CosmeticUseEnable0 ? 0x00FF00 : 0xFF0000
});
cosmeticText0.x = cosmeticAsset.x;
-cosmeticText0.y = cosmeticAsset.y + 100;
+cosmeticText0.y = cosmeticAsset.y + 50;
game.addChild(cosmeticText0);
if (CosmeticUseEnable0) {
SkinSelect.push(cosmeticAsset);
}
@@ -255,9 +255,9 @@
size: 50,
fill: CosmeticUseEnable1 ? 0x00FF00 : 0xFF0000
});
cosmeticText1.x = cosmetic1.x;
-cosmeticText1.y = cosmetic1.y + 100;
+cosmeticText1.y = cosmetic1.y + 50;
game.addChild(cosmeticText1);
if (CosmeticUseEnable1) {
SkinSelect.push(cosmetic1);
}
@@ -272,9 +272,9 @@
size: 50,
fill: CosmeticUseEnable2 ? 0x00FF00 : 0xFF0000
});
cosmeticText2.x = cosmetic2.x;
-cosmeticText2.y = cosmetic2.y + 100;
+cosmeticText2.y = cosmetic2.y + 50;
game.addChild(cosmeticText2);
if (CosmeticUseEnable2) {
SkinSelect.push(cosmetic2);
}
@@ -291,9 +291,9 @@
size: 50,
fill: CosmeticUseEnable3 ? 0x00FF00 : 0xFF0000
});
cosmeticText3.x = cosmetic3.x;
-cosmeticText3.y = cosmetic3.y + 100;
+cosmeticText3.y = cosmetic3.y + 50;
game.addChild(cosmeticText3);
if (CosmeticUseEnable3) {
SkinSelect.push(cosmetic3);
}
@@ -308,9 +308,9 @@
size: 50,
fill: CosmeticUseEnable4 ? 0x00FF00 : 0xFF0000
});
cosmeticText4.x = cosmetic4.x;
-cosmeticText4.y = cosmetic4.y + 100;
+cosmeticText4.y = cosmetic4.y + 50;
game.addChild(cosmeticText4);
if (CosmeticUseEnable4) {
SkinSelect.push(cosmetic4);
}
@@ -325,9 +325,9 @@
size: 50,
fill: CosmeticUseEnable5 ? 0x00FF00 : 0xFF0000
});
cosmeticText5.x = cosmetic5.x;
-cosmeticText5.y = cosmetic5.y + 100;
+cosmeticText5.y = cosmetic5.y + 50;
game.addChild(cosmeticText5);
if (CosmeticUseEnable5) {
SkinSelect.push(cosmetic5);
}
@@ -342,9 +342,9 @@
size: 50,
fill: CosmeticUseEnable6 ? 0x00FF00 : 0xFF0000
});
cosmeticText6.x = cosmetic6.x;
-cosmeticText6.y = cosmetic6.y + 100;
+cosmeticText6.y = cosmetic6.y + 50;
game.addChild(cosmeticText6);
if (CosmeticUseEnable6) {
SkinSelect.push(cosmetic6);
}
@@ -359,9 +359,9 @@
size: 50,
fill: CosmeticUseEnable7 ? 0x00FF00 : 0xFF0000
});
cosmeticText7.x = cosmetic7.x;
-cosmeticText7.y = cosmetic7.y + 100;
+cosmeticText7.y = cosmetic7.y + 50;
game.addChild(cosmeticText7);
if (CosmeticUseEnable7) {
SkinSelect.push(cosmetic7);
}
@@ -376,9 +376,9 @@
size: 50,
fill: CosmeticUseEnable8 ? 0x00FF00 : 0xFF0000
});
cosmeticText8.x = cosmetic8.x;
-cosmeticText8.y = cosmetic8.y + 100;
+cosmeticText8.y = cosmetic8.y + 50;
game.addChild(cosmeticText8);
if (CosmeticUseEnable8) {
SkinSelect.push(cosmetic8);
}
@@ -395,9 +395,9 @@
size: 50,
fill: CosmeticUseEnable9 ? 0x00FF00 : 0xFF0000
});
cosmeticText9.x = cosmetic9.x;
-cosmeticText9.y = cosmetic9.y + 100;
+cosmeticText9.y = cosmetic9.y + 50;
game.addChild(cosmeticText9);
if (CosmeticUseEnable9) {
SkinSelect.push(cosmetic9);
}
@@ -412,9 +412,9 @@
size: 50,
fill: CosmeticUseEnable10 ? 0x00FF00 : 0xFF0000
});
cosmeticText10.x = cosmetic10.x;
-cosmeticText10.y = 150;
+cosmeticText10.y = cosmetic10.y + 50;
game.addChild(cosmeticText10);
if (CosmeticUseEnable10) {
SkinSelect.push(cosmetic10);
}
@@ -429,9 +429,9 @@
size: 50,
fill: CosmeticUseEnable11 ? 0x00FF00 : 0xFF0000
});
cosmeticText11.x = cosmetic11.x;
-cosmeticText11.y = 150;
+cosmeticText11.y = cosmetic11.y + 50;
game.addChild(cosmeticText11);
if (CosmeticUseEnable11) {
SkinSelect.push(cosmetic11);
}
@@ -446,9 +446,9 @@
size: 50,
fill: CosmeticUseEnable12 ? 0x00FF00 : 0xFF0000
});
cosmeticText12.x = cosmetic12.x;
-cosmeticText12.y = 150;
+cosmeticText12.y = cosmetic12.y + 50;
game.addChild(cosmeticText12);
if (CosmeticUseEnable12) {
SkinSelect.push(cosmetic12);
}
@@ -463,9 +463,9 @@
size: 50,
fill: CosmeticUseEnable13 ? 0x00FF00 : 0xFF0000
});
cosmeticText13.x = cosmetic13.x;
-cosmeticText13.y = 150;
+cosmeticText13.y = cosmetic13.y + 50;
game.addChild(cosmeticText13);
if (CosmeticUseEnable13) {
SkinSelect.push(cosmetic13);
}
@@ -480,9 +480,9 @@
size: 50,
fill: CosmeticUseEnable14 ? 0x00FF00 : 0xFF0000
});
cosmeticText14.x = cosmetic14.x;
-cosmeticText14.y = 150;
+cosmeticText14.y = cosmetic14.y + 50;
game.addChild(cosmeticText14);
if (CosmeticUseEnable14) {
SkinSelect.push(cosmetic14);
}
que no contenga sombras ni luces
una cabeza de moai redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera de hierro. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera de oro. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
una piedra redonda musgosa. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
la bandera de argentina redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de cobre. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de silver. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
moneda de gold. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
diamante Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una rueda de carretilla medieval. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
pelota de basquetbal modelo Molten. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
pelota de futbol hecha de hielo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Bola disco. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de voley de planta. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de pinchos. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una bola de lana. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Agrega una esfera que dentro contenga un cielo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una esfera con la via láctea. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
proporción 1000-2000, marios más robustos y sin tanto relieve
Un papel medieval con una enorme flecha hacia la izquierda de pintura en medio. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera del dragon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera demoniaca. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Esfera de hada. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
una manzana redonda. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un capiraba redondo como una pelota. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un armadillo hecho bolita. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Una estrella redondita. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Mejorar el diseños de lás casas para que sean más medievales y aumentar su calidad, más arboles y mejorar la calidad del cesped