User prompt
elimina el ultimo boton de mejora
User prompt
elimina el ultimo boton de mejora
User prompt
elimina el ultimo boton de mejora
User prompt
y que tampoco se pueda pulsar ningun boton que no sea el de confirmar y el de volver
User prompt
haz que quand opulses el boton de reiniciar y te salga el menu no puedas volver a pulsar el de reiniciar hasta que salgas de ese menu
User prompt
El texto "Doble click: 0:00" hazlo un poco mas arriva
User prompt
El texto "Doble click: 0:00" hazlo un poco mas arriva
User prompt
haz el timer un poco mas grande y llamativa
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 50
User prompt
haz una caja de scrolling arriba a la derecha que se deslice hacia abajo
User prompt
separa un poquito los botones de mejora con el texto "MEJORAS"
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 56
User prompt
arregla este error
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 55
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 55
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 55
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 52
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 52
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleX = scale;' Line Number: 51
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 52
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 52
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 51
User prompt
arregla el error que me sale y vuelve a hacer que salgan todos los botones, que han desaparecido
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'coinGraphics.scaleY = scale;' Line Number: 56
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var BonusCoin = Container.expand(function () {
var self = Container.call(this);
var coinGraphics = self.attachAsset('bonusCoin', {
anchorX: 0.5,
anchorY: 0.5
});
// Removed the '2X' text from the bonus coin
// Pulsing animation
self.pulseTimer = 0;
self.update = function () {
self.pulseTimer++;
var scale = 1 + Math.sin(self.pulseTimer * 0.1) * 0.2;
coinGraphics.scaleX = scale;
coinGraphics.scaleY = scale;
};
self.down = function (x, y, obj) {
// Prevent clicking when dialog is open
if (isDialogOpen) {
return;
}
// Play coin click sound
LK.getSound('coinClick').play();
// Activate 2x multiplier
isDoubleClickActive = true;
doubleClickTimer = 3600; // 60 seconds * 60 FPS
lastBonusCoinTime = Date.now();
storage.lastBonusCoinTime = lastBonusCoinTime;
storage.isDoubleClickActive = isDoubleClickActive;
storage.doubleClickTimer = doubleClickTimer;
// Visual feedback
tween(self, {
scaleX: 0,
scaleY: 0,
alpha: 0
}, {
duration: 300,
onFinish: function onFinish() {
self.destroy();
}
});
// Reset bonus coin availability
bonusCoin = null;
};
return self;
});
var ConfirmDialog = Container.expand(function () {
var self = Container.call(this);
var confirmText = self.addChild(new Text2('⚠️ ¿Estás seguro?', {
size: 50,
fill: 0x000000
}));
confirmText.anchor.set(0.5, 0.5);
confirmText.y = -30;
var buttonBackground = self.attachAsset('resetButton', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.21
});
buttonBackground.y = 100;
var buttonText = self.addChild(new Text2('✅ CONFIRMAR', {
size: 40,
fill: 0x000000
}));
buttonText.anchor.set(0.5, 0.5);
buttonText.y = 100;
// Add back button
var backButtonBackground = self.attachAsset('resetButton', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1.0
});
backButtonBackground.y = 250;
var backButtonText = self.addChild(new Text2('← VOLVER', {
size: 40,
fill: 0x000000
}));
backButtonText.anchor.set(0.5, 0.5);
backButtonText.y = 250;
buttonBackground.down = function (x, y, obj) {
if (self.onConfirm) {
self.onConfirm();
}
darkOverlay.destroy(); // Remove the dark overlay when confirmed
isDialogOpen = false; // Reset dialog state
self.destroy();
};
buttonText.down = function (x, y, obj) {
if (self.onConfirm) {
self.onConfirm();
}
darkOverlay.destroy(); // Remove the dark overlay when confirmed
isDialogOpen = false; // Reset dialog state
self.destroy();
};
backButtonBackground.down = function (x, y, obj) {
darkOverlay.destroy(); // Remove the dark overlay when going back
isDialogOpen = false; // Reset dialog state
self.destroy();
};
backButtonText.down = function (x, y, obj) {
darkOverlay.destroy(); // Remove the dark overlay when going back
isDialogOpen = false; // Reset dialog state
self.destroy();
};
return self;
});
var MoneyButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('moneyButton', {
anchorX: 0.5,
anchorY: 0.5
});
var moneyText = self.addChild(new Text2('', {
size: 200,
fill: 0x000000
}));
moneyText.anchor.set(0.5, 0.5);
self.down = function (x, y, obj) {
// Prevent clicking when dialog is open
if (isDialogOpen) {
return;
}
tween(buttonGraphics, {
scaleX: 0.9,
scaleY: 0.9
}, {
duration: 50
});
LK.getSound('coinClick').play();
var earned = moneyPerClick;
if (isDoubleClickActive) {
earned *= 2;
}
money += earned;
updateMoneyDisplay();
var particle = new MoneyParticle();
particle.setValue(earned);
particle.x = self.x + (Math.random() - 0.5) * 200;
particle.y = self.y - 100;
game.addChild(particle);
moneyParticles.push(particle);
};
self.up = function (x, y, obj) {
tween(buttonGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 100
});
};
return self;
});
var MoneyParticle = Container.expand(function () {
var self = Container.call(this);
// Removed the yellow square asset to display only the number of coins earned per click
var particleText = self.addChild(new Text2('+$0', {
size: 60,
fill: 0x000000
}));
particleText.anchor.set(0.5, 0.5);
self.lifetime = 60;
self.velocityY = -8;
self.setValue = function (value) {
particleText.setText('$' + formatNumber(value)); // Display the number of coins earned per click with a dollar symbol
};
self.update = function () {
self.y += self.velocityY;
self.velocityY += 0.3;
self.lifetime--;
self.alpha = self.lifetime / 60;
if (self.lifetime <= 0) {
self.shouldDestroy = true;
}
};
return self;
});
var MuteButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('muteButton', {
anchorX: 0.5,
anchorY: 0.5
});
var muteText = self.addChild(new Text2('♪', {
size: 60,
fill: 0x000000
}));
muteText.anchor.set(0.5, 0.5);
self.isMuted = storage.isMuted || false;
self.updateDisplay = function () {
if (self.isMuted) {
muteText.setText('♪');
buttonGraphics.tint = 0x666666;
} else {
muteText.setText('♪');
buttonGraphics.tint = 0x4CAF50;
}
};
self.down = function (x, y, obj) {
// Prevent clicking when dialog is open
if (isDialogOpen) {
return;
}
self.isMuted = !self.isMuted;
if (self.isMuted) {
LK.stopMusic();
} else {
LK.playMusic('backgroundMusic');
}
self.updateDisplay();
storage.isMuted = self.isMuted;
};
self.updateDisplay();
return self;
});
var ResetButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('resetButton', {
anchorX: 0.5,
anchorY: 0.5
});
var resetText = self.addChild(new Text2('🔄 REINICIAR', {
size: 40,
fill: 0x000000
}));
resetText.anchor.set(0.5, 0.5);
self.down = function (x, y, obj) {
// Prevent multiple dialogs from opening
if (isDialogOpen) {
return;
}
isDialogOpen = true;
// Darken the background
darkOverlay = LK.getAsset('pixelBlock1', {
width: 2048,
height: 2732,
alpha: 0.5,
interactive: true
});
game.addChild(darkOverlay);
var confirmDialog = new ConfirmDialog();
game.addChild(confirmDialog);
confirmDialog.x = 2048 / 2;
confirmDialog.y = 2732 / 2;
confirmDialog.onConfirm = function () {
darkOverlay.destroy(); // Remove the dark overlay when confirmed
// Reset money and purchases
money = 0;
moneyPerClick = 1;
autoClickerRate = 0;
for (var i = 0; i < upgradeButtons.length; i++) {
upgradeButtons[i].purchased = false;
upgradeButtons[i].updateDisplay();
if (upgradeButtons[i].upgradeType === 'click2x') {
upgradeButtons[i].getChildAt(1).setText('+2 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click8x') {
upgradeButtons[i].getChildAt(1).setText('+8 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click5x') {
upgradeButtons[i].getChildAt(1).setText('+5 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click10x') {
upgradeButtons[i].getChildAt(1).setText('+10 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click50x') {
upgradeButtons[i].getChildAt(1).setText('+50 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click200x') {
upgradeButtons[i].getChildAt(1).setText('+200 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click500x') {
upgradeButtons[i].getChildAt(1).setText('+500 Click Power');
} else if (upgradeButtons[i].upgradeType === 'auto1') {
upgradeButtons[i].getChildAt(1).setText('Auto Clicker');
} else if (upgradeButtons[i].upgradeType === 'auto2') {
upgradeButtons[i].getChildAt(1).setText('Super Auto');
}
upgradeButtons[i].getChildAt(2).setText('$' + formatNumber(upgradeButtons[i].cost)); // Reset the cost text
}
// Reset upgrades
for (var i = 0; i < upgradeData.length; i++) {
upgradeData[i].cost = upgradeData[i].cost; // Reset cost to initial value
upgradeData[i].multiplier = upgradeData[i].multiplier; // Reset multiplier to initial value
}
updateMoneyDisplay();
saveGame();
};
confirmDialog.onConfirm = function () {
// Reset money and purchases
money = 0;
moneyPerClick = 1;
autoClickerRate = 0;
// Reset bonus coin timer
lastBonusCoinTime = 0;
isDoubleClickActive = false;
doubleClickTimer = 0;
if (bonusCoin) {
bonusCoin.destroy();
bonusCoin = null;
}
for (var i = 0; i < upgradeButtons.length; i++) {
upgradeButtons[i].purchased = false;
upgradeButtons[i].updateDisplay();
if (upgradeButtons[i].upgradeType === 'click2x') {
upgradeButtons[i].getChildAt(1).setText('2 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click8x') {
upgradeButtons[i].getChildAt(1).setText('10 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click5x') {
upgradeButtons[i].getChildAt(1).setText('5 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click10x') {
upgradeButtons[i].getChildAt(1).setText('10 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click50x') {
upgradeButtons[i].getChildAt(1).setText('50 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click200x') {
upgradeButtons[i].getChildAt(1).setText('200 Click Power');
} else if (upgradeButtons[i].upgradeType === 'click500x') {
upgradeButtons[i].getChildAt(1).setText('500 Click Power');
} else if (upgradeButtons[i].upgradeType === 'auto1') {
upgradeButtons[i].getChildAt(1).setText('Auto Clicker');
} else if (upgradeButtons[i].upgradeType === 'auto2') {
upgradeButtons[i].getChildAt(1).setText('Super Auto');
}
upgradeButtons[i].getChildAt(2).setText('$' + formatNumber(upgradeButtons[i].cost)); // Reset the cost text
}
// Reset upgrades
for (var i = 0; i < upgradeData.length; i++) {
upgradeData[i].cost = upgradeData[i].cost; // Reset cost to initial value
upgradeData[i].multiplier = upgradeData[i].multiplier; // Reset multiplier to initial value
}
updateMoneyDisplay();
saveGame();
};
};
return self;
});
var UpgradeButton = Container.expand(function () {
var self = Container.call(this);
self.upgradeType = '';
self.cost = 0;
self.multiplier = 1;
self.purchased = false;
var buttonGraphics = self.attachAsset('upgradeButton', {
anchorX: 0.5,
anchorY: 0.15,
scaleX: 1.1 // Increase width by 10%
});
var titleText = self.addChild(new Text2('Upgrade', {
size: 40,
fill: 0xffffff
}));
titleText.anchor.set(0.5, 0.5);
titleText.y = 35;
var costText = self.addChild(new Text2('$0', {
size: 40,
fill: 0xffffff
}));
costText.anchor.set(0.5, 0.5);
costText.y = 90;
self.setup = function (type, baseCost, mult) {
self.upgradeType = type;
self.cost = baseCost;
self.multiplier = mult;
if (type === 'click2x') {
titleText.setText('💰 2 Click Power');
} else if (type === 'click8x') {
titleText.setText('🚀 10 Click Power');
} else if (type === 'click5x') {
titleText.setText('⭐ 5 Click Power');
} else if (type === 'click10x') {
titleText.setText('🔥 10 Click Power');
} else if (type === 'click50x') {
titleText.setText('💎 50 Click Power');
} else if (type === 'click200x') {
titleText.setText('👑 200 Click Power');
} else if (type === 'click500x') {
titleText.setText('🌟 500 Click Power');
} else if (type === 'auto1') {
titleText.setText('🤖 Auto Clicker');
} else if (type === 'auto2') {
titleText.setText('⚡ Super Auto');
}
self.updateDisplay();
};
self.updateDisplay = function () {
costText.setText('$' + formatNumber(self.cost));
if (money >= self.cost && !self.purchased) {
buttonGraphics.tint = 0xffffff;
} else {
buttonGraphics.tint = 0x666666;
}
};
self.down = function (x, y, obj) {
// Prevent clicking when dialog is open
if (isDialogOpen) {
return;
}
if (money >= self.cost && !self.purchased) {
money -= self.cost;
self.purchased = true;
if (self.upgradeType.startsWith('click')) {
if (self.upgradeType === 'click8x') {
moneyPerClick += 8;
} else if (self.upgradeType === 'click10x') {
moneyPerClick += 10;
} else if (self.upgradeType === 'click50x') {
moneyPerClick += 40;
} else if (self.upgradeType === 'click200x') {
moneyPerClick += 150;
} else if (self.upgradeType === 'click500x') {
moneyPerClick += 300;
} else {
moneyPerClick *= self.multiplier;
}
} else if (self.upgradeType.startsWith('auto')) {
if (self.upgradeType === 'auto1') {
autoClickerRate += 1;
} else if (self.upgradeType === 'auto2') {
autoClickerRate += 5;
}
}
LK.getSound('upgrade').play();
buttonGraphics.tint = 0xffffff;
titleText.setText('✅ COMPRADO');
costText.setText('');
updateMoneyDisplay();
saveGame();
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x1a1a1a
});
/****
* Game Code
****/
var darkOverlay; // Define darkOverlay in the global scope
var isDialogOpen = false; // Track if confirmation dialog is open
var money = storage.money || 0;
var moneyPerClick = storage.moneyPerClick || 1;
var autoClickerRate = storage.autoClickerRate || 1;
var autoClickerTimer = 0;
var moneyParticles = [];
var moneyDisplay;
var moneyPerClickDisplay;
var autoIncomeDisplay;
var autoClicksDisplay;
var moneyButton;
var upgradeButtons = [];
var bonusCoin = null;
var lastBonusCoinTime = storage.lastBonusCoinTime || 0;
var isDoubleClickActive = storage.isDoubleClickActive || false;
var doubleClickTimer = storage.doubleClickTimer || 0;
var BONUS_COIN_COOLDOWN = 300000; // 5 minutes in milliseconds
function formatNumber(num) {
if (num >= 1000000000) {
return (num / 1000000000).toFixed(1) + 'B';
} else if (num >= 1000000) {
return (num / 1000000).toFixed(1) + 'M';
} else if (num >= 1000) {
return (num / 1000).toFixed(1) + 'K';
}
return Math.floor(num).toString();
}
function updateMoneyDisplay() {
moneyDisplay.setText('💰 $' + formatNumber(money));
moneyPerClickDisplay.setText('💸 Por Click: $' + formatNumber(moneyPerClick));
for (var i = 0; i < upgradeButtons.length; i++) {
upgradeButtons[i].updateDisplay();
}
}
function saveGame() {
storage.money = money;
storage.moneyPerClick = moneyPerClick;
storage.autoClickerRate = autoClickerRate;
storage.lastBonusCoinTime = lastBonusCoinTime;
storage.isDoubleClickActive = isDoubleClickActive;
storage.doubleClickTimer = doubleClickTimer;
}
// Create animated background with more elements
var backgroundElements = [];
// Add background image
var backgroundImage = game.attachAsset('Background', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.128,
scaleY: 0.128
});
backgroundImage.x = 2048 / 2;
backgroundImage.y = 2732 / 2;
// Create money display
moneyDisplay = new Text2('💰 $0', {
size: 80,
fill: 0x4CAF50
});
moneyDisplay.anchor.set(0.5, 0);
moneyDisplay.x = 650;
moneyDisplay.y = 150;
game.addChild(moneyDisplay);
// Create money per click display
moneyPerClickDisplay = new Text2('💸 Por Click: $1', {
size: 40,
fill: 0x000000
});
moneyPerClickDisplay.anchor.set(0.5, 0);
moneyPerClickDisplay.x = 650;
moneyPerClickDisplay.y = 250;
game.addChild(moneyPerClickDisplay);
// Create money button
moneyButton = new MoneyButton();
moneyButton.x = 650;
moneyButton.y = 800;
moneyButton.scaleX = 1.6; // Make button 60% larger (20% smaller than previous 100% increase)
moneyButton.scaleY = 1.6; // Make button 60% larger (20% smaller than previous 100% increase)
game.addChild(moneyButton);
// Create upgrade menu title
var upgradeTitle = new Text2('🛒 MEJORAS', {
size: 60,
fill: 0x000000
});
upgradeTitle.anchor.set(0.5, 0);
upgradeTitle.x = 1524;
upgradeTitle.y = 150;
game.addChild(upgradeTitle);
// Create upgrade buttons
var upgradeData = [{
type: 'click2x',
cost: 100,
multiplier: 2
}, {
type: 'click8x',
cost: 500,
multiplier: 8
}];
for (var i = 0; i < upgradeData.length; i++) {
var upgradeButton = new UpgradeButton();
upgradeButton.setup(upgradeData[i].type, upgradeData[i].cost, upgradeData[i].multiplier);
upgradeButton.x = 1524; // Align with the 'UPGRADES' text
upgradeButton.y = 280 + i * 230; // Increase spacing between upgrade buttons and MEJORAS title
upgradeButton.scaleX = 1.0; // Make buttons 50% narrower
game.addChild(upgradeButton);
upgradeButtons.push(upgradeButton);
}
// Update displays
updateMoneyDisplay();
// Create mute button
var muteButton = new MuteButton();
muteButton.x = 150;
muteButton.y = 2600;
game.addChild(muteButton);
// Play background music if not muted
if (!muteButton.isMuted) {
LK.playMusic('backgroundMusic');
}
// Create reset button
var resetButton = new ResetButton();
resetButton.x = 1800;
resetButton.y = 2600;
resetButton.scaleX = 1.0; // Make reset button 120% narrower
game.addChild(resetButton);
// Create timer displays
var bonusTimerDisplay = new Text2('Próxima moneda: 5:00', {
size: 70,
fill: 0xffd700
});
bonusTimerDisplay.anchor.set(0.5, 0);
bonusTimerDisplay.x = 2048 / 2;
bonusTimerDisplay.y = 2580;
game.addChild(bonusTimerDisplay);
var doubleEffectDisplay = new Text2('', {
size: 70,
fill: 0xff4444
});
doubleEffectDisplay.anchor.set(0.5, 0);
doubleEffectDisplay.x = 2048 / 2;
doubleEffectDisplay.y = 2570;
game.addChild(doubleEffectDisplay);
// Game update loop
game.update = function () {
// Auto clicker functionality
if (autoClickerRate > 0) {
autoClickerTimer++;
if (autoClickerTimer >= 12) {
// 60 ticks per second / 5 = 12 ticks for 5 clicks per second
autoClickerTimer = 0;
money += moneyPerClick;
updateMoneyDisplay();
}
}
// Bonus coin timer logic
var currentTime = Date.now();
if (!bonusCoin && !isDoubleClickActive && currentTime - lastBonusCoinTime >= BONUS_COIN_COOLDOWN) {
// Spawn bonus coin at random position avoiding buttons
bonusCoin = new BonusCoin();
var attempts = 0;
var validPosition = false;
while (!validPosition && attempts < 20) {
var randomX = 300 + Math.random() * 1448; // Keep within safe bounds
var randomY = 400 + Math.random() * 1800; // Keep within safe bounds
// Check if position is too close to money button (radius check)
var distanceToMoneyButton = Math.sqrt(Math.pow(randomX - moneyButton.x, 2) + Math.pow(randomY - moneyButton.y, 2));
// Check if position is too close to upgrade buttons area
var tooCloseToUpgrades = randomX > 1200 && randomX < 1848 && randomY > 200 && randomY < 1300;
// Check if position is too close to bottom buttons
var tooCloseToBottomButtons = randomY > 2400;
if (distanceToMoneyButton > 400 && !tooCloseToUpgrades && !tooCloseToBottomButtons) {
validPosition = true;
bonusCoin.x = randomX;
bonusCoin.y = randomY;
} else {
attempts++;
}
}
// Fallback position if no valid position found
if (!validPosition) {
bonusCoin.x = 300;
bonusCoin.y = 1500;
}
game.addChild(bonusCoin);
}
// Handle double click effect countdown
if (isDoubleClickActive) {
doubleClickTimer--;
if (doubleClickTimer <= 0) {
isDoubleClickActive = false;
doubleClickTimer = 0;
lastBonusCoinTime = Date.now(); // Reset timer when effect ends
storage.isDoubleClickActive = false;
storage.doubleClickTimer = 0;
storage.lastBonusCoinTime = lastBonusCoinTime;
}
}
// Update timer displays
if (isDoubleClickActive) {
var remainingSeconds = Math.ceil(doubleClickTimer / 60);
var minutes = Math.floor(remainingSeconds / 60);
var seconds = remainingSeconds % 60;
doubleEffectDisplay.setText('Doble click: ' + minutes + ':' + (seconds < 10 ? '0' : '') + seconds);
bonusTimerDisplay.setText('');
} else {
doubleEffectDisplay.setText('');
var timeRemaining = BONUS_COIN_COOLDOWN - (currentTime - lastBonusCoinTime);
if (timeRemaining > 0) {
var remainingSeconds = Math.ceil(timeRemaining / 1000);
var minutes = Math.floor(remainingSeconds / 60);
var seconds = remainingSeconds % 60;
bonusTimerDisplay.setText('Próxima moneda: ' + minutes + ':' + (seconds < 10 ? '0' : '') + seconds);
} else {
bonusTimerDisplay.setText('¡Moneda disponible!');
}
}
// Update particles
for (var i = moneyParticles.length - 1; i >= 0; i--) {
var particle = moneyParticles[i];
if (particle.shouldDestroy) {
particle.destroy();
moneyParticles.splice(i, 1);
}
}
// Auto save every 5 seconds
if (LK.ticks % 300 === 0) {
saveGame();
}
}; ===================================================================
--- original.js
+++ change.js
@@ -538,12 +538,8 @@
}, {
type: 'click8x',
cost: 500,
multiplier: 8
-}, {
- type: 'click50x',
- cost: 2000,
- multiplier: 50
}];
for (var i = 0; i < upgradeData.length; i++) {
var upgradeButton = new UpgradeButton();
upgradeButton.setup(upgradeData[i].type, upgradeData[i].cost, upgradeData[i].multiplier);
Haz una moneda 2d pero un pixel. In-Game asset. 2d. High contrast. No shadows
haz un boton tipo pixel. In-Game asset. 2d. High contrast. No shadows
creame un paisage pixer de 2048x2732. In-Game asset. 2d. High contrast. No shadows
crea una caja de madera que este el medio vacio solo hacme el marco y un color de madera oscura en el centro. In-Game asset. 2d. High contrast. No shadows
haz una caja con bordes estrechos y el fondo de color madera oscuro. In-Game asset. 2d. High contrast. No shadows