User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'reload')' in or related to this line: 'location.reload();' Line Number: 534
User prompt
Please fix the bug: 'Uncaught TypeError: game.destroy is not a function' in or related to this line: 'game.destroy();' Line Number: 534
User prompt
Bana bas yazını biraz yukarı al
User prompt
Oyuna başlangıç bölümü ekle. Burada normal buton olsun ve üstünde bana bas yazsın. Basınca diğer şeyler gelsin
User prompt
Yeniden Başlat tuşunu Kaydetin altına koy ve kaydeti biraz yukarı al
User prompt
Paragöz her Hold Bonus yaptığında vihihi sesini kullan
User prompt
Please fix the bug: 'Uncaught TypeError: LK.restart is not a function' in or related to this line: 'LK.restart();' Line Number: 532
User prompt
Oyuna yeniden başlatma tuşu ekle. Bu tuş, müzik gelişimini aldıktan sonra ortaya çıksın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Oyunda paragöze dokunarak onu sevebilelim. Her dokunduğumuzda ondan 1 kalp çıksın. 20 kalp başına butona her basılı tuttuğumuzda +1 fazladan basılı tutma puanı kazanalım ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1
User prompt
Müzik gelişimini alınca demoyu bitirdin yazsın
User prompt
müzik gelişimini alınca arkada rahat adlı müzik çalsın
User prompt
Oyuna Müzik gelişimi ekle 700 değerinde olsun ve alınca yok olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Paragözü Asset kısmına ekle
User prompt
Oyuna Paragöz adında bir gelişim ekle. 500 değerinde olsun. Aldığımızda sol alta Paragöz adında bir karakter çıksın. Düşen paralardan 5 saniyede bir 1 tane toplasın. Her yeni geliştirmede Topladığı saniye düşsün ↪💡 Consider importing and using the following plugins: @upit/storage.v1, @upit/tween.v1
User prompt
Please fix the bug: 'upgradeButton.getChildAt(...).setText is not a function' in or related to this line: 'upgradeButton.getChildAt(0).setText('+1 gelişim (' + upgradeButton.cost + ')');' Line Number: 512
User prompt
Her yeni oyunda +1 gelişim ve otomatik buton gelişimi ilk halini gösteriyor. Mesela +1 gelişim 20 değerinde gösteriyor fakat değeri çok daha üstüne çıkardım zaten
User prompt
gelişim butonlarının en son halini(en son kaydedilen değerini) kaydet ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
parayı asset kısmına ekle
User prompt
Gelişimleri de kaydet ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
310 değerinde yeni bir geliştirme ekle. Bunu aldığımızda gökten para yağmaya başlasın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Kaydet tuşunu sağ alta al
User prompt
Oyuna Save tuşu ekle ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Arkaplanı gri yap
User prompt
Bu geliştirmeyi alınca geliştirme kaybolsun. Ve aldığımızda butona basılı tutarak puan alabilelim ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuna 300 puan değerinde butona basılı tutarak puan kazanabileceğimiz bir gelişim ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var AutoButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0xff9800; self.cost = 100; self.level = 0; // Create button text var buttonText = new Text2('Otomatik Buton (100)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); self.level += 1; autoTapLevel = self.level; autoTapInterval = Math.max(1000, 8000 - (self.level - 1) * 1000); self.cost += 30; buttonText.setText('Otomatik Buton (' + self.cost + ')'); scoreText.setText(LK.getScore()); // Scale animation tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0xff9800 }, { duration: 200, easing: tween.easeIn }); } }); } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var FallingMoney = Container.expand(function () { var self = Container.call(this); var moneyGraphics = self.attachAsset('money', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.value = 10; self.update = function () { self.y += self.speed; // Remove if off screen if (self.y > 2732 + 100) { self.destroy(); } }; self.down = function (x, y, obj) { // Collect money LK.setScore(LK.getScore() + self.value); scoreText.setText(LK.getScore()); // Create floating text var floatingText = new FloatingText(); floatingText.init(self.value, self.x, self.y); game.addChild(floatingText); // Remove money self.destroy(); }; return self; }); var FloatingText = Container.expand(function () { var self = Container.call(this); self.init = function (points, x, y) { var text = new Text2('+' + points, { size: 80, fill: 0x00FF00 }); text.anchor.set(0.5, 0.5); self.addChild(text); self.x = x; self.y = y; // Animate the text floating upward and fading out tween(self, { y: self.y - 300, alpha: 0 }, { duration: 1500, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var Heart = Container.expand(function () { var self = Container.call(this); var heartGraphics = self.attachAsset('heart', { anchorX: 0.5, anchorY: 0.5 }); self.init = function (x, y) { self.x = x; self.y = y; // Animate the heart floating upward and fading out tween(self, { y: self.y - 200, alpha: 0 }, { duration: 1500, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var HoldButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0x9c27b0; self.cost = 300; self.isHolding = false; self.holdTimer = 0; self.holdInterval = 100; // Points every 100ms while holding self.holdPointsPerInterval = 1; // Create button text var buttonText = new Text2('Basılı Tut (300)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); scoreText.setText(LK.getScore()); // Remove the hold button from the game self.destroy(); // Enable hold functionality on tap button tapButton.canHold = true; } }; self.up = function (x, y, obj) { self.isHolding = false; tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; self.update = function () { if (self.isHolding) { self.holdTimer += 16.67; // Approximately 60 FPS if (self.holdTimer >= self.holdInterval) { self.holdTimer = 0; LK.setScore(LK.getScore() + self.holdPointsPerInterval); scoreText.setText(LK.getScore()); // Create floating text at button position var floatingText = new FloatingText(); floatingText.init(self.holdPointsPerInterval, self.x, self.y); game.addChild(floatingText); } } }; return self; }); var MusicUpgradeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0x9C27B0; self.cost = 700; // Create button text var buttonText = new Text2('Müzik (700)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); scoreText.setText(LK.getScore()); // Remove the music button from the game self.destroy(); // Set music as purchased musicUpgradePurchased = true; // Play the music LK.playMusic('Rahat'); // Show demo completion message var demoCompleteText = new Text2('demoyu bitirdin', { size: 100, fill: 0x00FF00 }); demoCompleteText.anchor.set(0.5, 0.5); demoCompleteText.x = 2048 / 2; demoCompleteText.y = 2732 / 2; game.addChild(demoCompleteText); // Animate demo complete text tween(demoCompleteText, { scaleX: 1.2, scaleY: 1.2, alpha: 0 }, { duration: 3000, easing: tween.easeOut, onFinish: function onFinish() { demoCompleteText.destroy(); // Create restart button after demo completion message disappears var restartButton = new RestartButton(); restartButton.x = 2048 / 2; restartButton.y = paraGozUpgradeButton.y + 120; game.addChild(restartButton); } }); // Scale animation tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0x9C27B0 }, { duration: 200, easing: tween.easeIn }); } }); } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var ParaGozCharacter = Container.expand(function () { var self = Container.call(this); // Create character graphics - simple colored box var characterGraphics = self.attachAsset('paragoz', { anchorX: 0.5, anchorY: 0.5 }); // Create character text var characterText = new Text2('Paragöz', { size: 30, fill: 0xFFFFFF }); characterText.anchor.set(0.5, 0.5); self.addChild(characterText); self.level = 1; self.collectInterval = 5000; // 5 seconds initially self.collectTimer = 0; self.loveCount = 0; self.down = function (x, y, obj) { // Increase love count self.loveCount += 1; // Create floating heart var heart = new Heart(); heart.init(self.x, self.y); game.addChild(heart); // Check if we reached 20 hearts milestone var milestone = Math.floor(self.loveCount / 20); var previousMilestone = Math.floor((self.loveCount - 1) / 20); if (milestone > previousMilestone && tapButton.canHold) { // Increase hold points per interval tapButton.holdPointsPerInterval += 1; // Show milestone message var milestoneText = new FloatingText(); milestoneText.init('+1 Hold Bonus!', self.x, self.y - 50); game.addChild(milestoneText); } }; self.update = function () { self.collectTimer += 16.67; // Approximately 60 FPS if (self.collectTimer >= self.collectInterval) { self.collectTimer = 0; // Find a falling money to collect for (var i = 0; i < fallingMoneyArray.length; i++) { var money = fallingMoneyArray[i]; if (money && !money.destroyed) { // Collect the money LK.setScore(LK.getScore() + money.value); scoreText.setText(LK.getScore()); // Create floating text at character position var floatingText = new FloatingText(); floatingText.init(money.value, self.x, self.y); game.addChild(floatingText); // Remove the money money.destroy(); fallingMoneyArray.splice(i, 1); break; // Only collect one money per interval } } } }; return self; }); var ParaGozUpgradeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0x4CAF50; self.cost = 500; self.level = 0; // Create button text var buttonText = new Text2('Paragöz (500)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); scoreText.setText(LK.getScore()); if (self.level === 0) { // First purchase - create the character paraGozCharacter = new ParaGozCharacter(); paraGozCharacter.x = 150; // Left side paraGozCharacter.y = 2732 - 150; // Bottom game.addChild(paraGozCharacter); paraGozActive = true; } else { // Upgrade - reduce collection time paraGozCharacter.collectInterval = Math.max(1000, paraGozCharacter.collectInterval - 500); paraGozCharacter.level += 1; } self.level += 1; self.cost += 200; buttonText.setText('Paragöz (' + self.cost + ')'); // Scale animation tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0x4CAF50 }, { duration: 200, easing: tween.easeIn }); } }); } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var RainUpgradeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0x2196F3; self.cost = 310; // Create button text var buttonText = new Text2('Para Yağmuru (310)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); scoreText.setText(LK.getScore()); // Remove the rain button from the game self.destroy(); // Enable money rain moneyRainActive = true; // Scale animation tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0x2196F3 }, { duration: 200, easing: tween.easeIn }); } }); } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var RestartButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0xFF5722; // Create button text var buttonText = new Text2('Yeniden Başlat', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { // Reset all game data storage.score = 0; storage.pointsPerTap = 1; storage.autoTapLevel = 0; storage.autoTapInterval = 8000; storage.canHold = false; storage.upgradeCost = 20; storage.autoCost = 100; storage.autoLevel = 0; storage.moneyRainActive = false; storage.holdCost = 300; storage.rainCost = 310; storage.paraGozActive = false; storage.paraGozCost = 500; storage.paraGozLevel = 0; storage.musicUpgradePurchased = false; storage.paraGozLoveCount = 0; storage.holdBonusFromLove = 0; // Restart the game by destroying current game and creating new one game.destroy(); game = new LK.Game({ backgroundColor: 0x808080 }); // Reload the entire game by re-executing the game code location.reload(); }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var SaveButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); buttonGraphics.tint = 0x4CAF50; // Create button text var buttonText = new Text2('Kaydet', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { // Save game data storage.score = LK.getScore(); storage.pointsPerTap = pointsPerTap; storage.autoTapLevel = autoTapLevel; storage.autoTapInterval = autoTapInterval; storage.canHold = tapButton.canHold; storage.upgradeCost = upgradeButton.cost; storage.autoCost = autoButton.cost; storage.autoLevel = autoButton.level; storage.moneyRainActive = moneyRainActive; storage.holdCost = holdButton ? holdButton.cost : 300; storage.rainCost = rainUpgradeButton ? rainUpgradeButton.cost : 310; storage.paraGozActive = paraGozActive; storage.paraGozCost = paraGozUpgradeButton.cost; storage.paraGozLevel = paraGozUpgradeButton.level; storage.musicUpgradePurchased = musicUpgradePurchased; // Save love system data storage.paraGozLoveCount = paraGozCharacter ? paraGozCharacter.loveCount : 0; storage.holdBonusFromLove = tapButton.canHold ? Math.max(0, tapButton.holdPointsPerInterval - 1) : 0; // Visual feedback tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0x4CAF50 }, { duration: 200, easing: tween.easeIn }); } }); // Show save confirmation var saveText = new Text2('Kaydedildi!', { size: 50, fill: 0x00FF00 }); saveText.anchor.set(0.5, 0.5); saveText.x = self.x; saveText.y = self.y - 100; game.addChild(saveText); // Animate save text tween(saveText, { y: saveText.y - 100, alpha: 0 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { saveText.destroy(); } }); }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); var TapButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('tapButton', { anchorX: 0.5, anchorY: 0.5 }); self.originalScale = 1.0; self.pressedScale = 0.9; self.canHold = false; self.isHolding = false; self.holdTimer = 0; self.holdInterval = 100; self.holdPointsPerInterval = 1; self.down = function (x, y, obj) { // Scale down animation tween(self, { scaleX: self.pressedScale, scaleY: self.pressedScale }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0xFFFFFF }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0xFFFFFF }, { duration: 150, easing: tween.easeIn }); } }); // Play tap sound LK.getSound('tapSound').play(); // Add points LK.setScore(LK.getScore() + pointsPerTap); // Update display scoreText.setText(LK.getScore()); // Create floating text at button position var floatingText = new FloatingText(); floatingText.init(pointsPerTap, self.x, self.y); game.addChild(floatingText); // Start holding if hold functionality is enabled if (self.canHold) { self.isHolding = true; self.holdTimer = 0; } }; self.up = function (x, y, obj) { // Scale back to normal tween(self, { scaleX: self.originalScale, scaleY: self.originalScale }, { duration: 100, easing: tween.easeOut }); // Stop holding self.isHolding = false; }; self.update = function () { if (self.canHold && self.isHolding) { self.holdTimer += 16.67; // Approximately 60 FPS if (self.holdTimer >= self.holdInterval) { self.holdTimer = 0; LK.setScore(LK.getScore() + self.holdPointsPerInterval); scoreText.setText(LK.getScore()); // Create floating text at button position var floatingText = new FloatingText(); floatingText.init(self.holdPointsPerInterval, self.x, self.y); game.addChild(floatingText); } } }; return self; }); var UpgradeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); self.cost = 20; self.upgrade = 1; // Create button text var buttonText = new Text2('+1 gelişim (20)', { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.down = function (x, y, obj) { if (LK.getScore() >= self.cost) { // Purchase upgrade LK.setScore(LK.getScore() - self.cost); pointsPerTap += 1; self.cost += 30; buttonText.setText('+1 gelişim (' + self.cost + ')'); scoreText.setText(LK.getScore()); // Scale animation tween(self, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut }); // Flash effect tween(buttonGraphics, { tint: 0x00FF00 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(buttonGraphics, { tint: 0xff9800 }, { duration: 200, easing: tween.easeIn }); } }); } }; self.up = function (x, y, obj) { tween(self, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x808080 }); /**** * Game Code ****/ // Load saved data or use defaults var pointsPerTap = storage.pointsPerTap || 1; var autoTapLevel = storage.autoTapLevel || 0; var autoTapInterval = storage.autoTapInterval || 8000; var autoTapTimer = 0; var moneyRainActive = storage.moneyRainActive || false; var moneyRainTimer = 0; var moneyRainInterval = 1000; // Spawn money every 1 second var fallingMoneyArray = []; var paraGozActive = storage.paraGozActive || false; var paraGozCharacter = null; var musicUpgradePurchased = storage.musicUpgradePurchased || false; // Load saved score if (storage.score) { LK.setScore(storage.score); } // Load love system data var paraGozLoveCount = storage.paraGozLoveCount || 0; var holdBonusFromLove = storage.holdBonusFromLove || 0; // Create and position the main tap button var tapButton = new TapButton(); tapButton.x = 2048 / 2; tapButton.y = 2732 / 2; // Apply saved hold functionality if (storage.canHold) { tapButton.canHold = true; // Apply love bonus to hold points tapButton.holdPointsPerInterval += holdBonusFromLove; } game.addChild(tapButton); // Create and position upgrade button var upgradeButton = new UpgradeButton(); upgradeButton.x = 2048 / 2; upgradeButton.y = tapButton.y + 300; // Apply saved upgrade cost if (storage.upgradeCost) { upgradeButton.cost = storage.upgradeCost; // Update button text to show saved cost upgradeButton.getChildAt(1).setText('+1 gelişim (' + upgradeButton.cost + ')'); } game.addChild(upgradeButton); // Create and position auto button var autoButton = new AutoButton(); autoButton.x = 2048 / 2; autoButton.y = upgradeButton.y + 120; // Apply saved auto cost and level if (storage.autoCost) { autoButton.cost = storage.autoCost; // Update button text to show saved cost autoButton.getChildAt(1).setText('Otomatik Buton (' + autoButton.cost + ')'); } if (storage.autoLevel) { autoButton.level = storage.autoLevel; } game.addChild(autoButton); // Create and position hold button (only if not purchased) var holdButton; if (!storage.canHold) { holdButton = new HoldButton(); holdButton.x = 2048 / 2; holdButton.y = autoButton.y + 120; // Apply saved hold cost if (storage.holdCost) { holdButton.cost = storage.holdCost; // Update button text to show saved cost holdButton.getChildAt(1).setText('Basılı Tut (' + holdButton.cost + ')'); } game.addChild(holdButton); } // Create and position rain upgrade button (only if not purchased) var rainUpgradeButton; if (!storage.moneyRainActive) { rainUpgradeButton = new RainUpgradeButton(); rainUpgradeButton.x = 2048 / 2; rainUpgradeButton.y = holdButton ? holdButton.y + 120 : autoButton.y + 120; // Apply saved rain cost if (storage.rainCost) { rainUpgradeButton.cost = storage.rainCost; // Update button text to show saved cost rainUpgradeButton.getChildAt(1).setText('Para Yağmuru (' + rainUpgradeButton.cost + ')'); } game.addChild(rainUpgradeButton); } // Create and position ParaGoz upgrade button var paraGozUpgradeButton = new ParaGozUpgradeButton(); paraGozUpgradeButton.x = 2048 / 2; paraGozUpgradeButton.y = rainUpgradeButton ? rainUpgradeButton.y + 120 : holdButton ? holdButton.y + 120 : autoButton.y + 120; // Apply saved ParaGoz cost and level if (storage.paraGozCost) { paraGozUpgradeButton.cost = storage.paraGozCost; // Update button text to show saved cost paraGozUpgradeButton.getChildAt(1).setText('Paragöz (' + paraGozUpgradeButton.cost + ')'); } if (storage.paraGozLevel) { paraGozUpgradeButton.level = storage.paraGozLevel; } game.addChild(paraGozUpgradeButton); // Create and position music upgrade button (only if not purchased) var musicUpgradeButton; if (!musicUpgradePurchased) { musicUpgradeButton = new MusicUpgradeButton(); musicUpgradeButton.x = 2048 / 2; musicUpgradeButton.y = paraGozUpgradeButton.y + 120; game.addChild(musicUpgradeButton); } // Create and position restart button (only if music upgrade is purchased) var restartButton; if (musicUpgradePurchased) { restartButton = new RestartButton(); restartButton.x = 2048 / 2; restartButton.y = paraGozUpgradeButton.y + 120; game.addChild(restartButton); } // Create ParaGoz character if previously purchased if (paraGozActive) { paraGozCharacter = new ParaGozCharacter(); paraGozCharacter.x = 150; // Left side paraGozCharacter.y = 2732 - 150; // Bottom if (storage.paraGozLevel) { paraGozCharacter.level = storage.paraGozLevel; paraGozCharacter.collectInterval = Math.max(1000, 5000 - (storage.paraGozLevel - 1) * 500); } // Apply saved love count paraGozCharacter.loveCount = paraGozLoveCount; game.addChild(paraGozCharacter); } // Create and position save button var saveButton = new SaveButton(); saveButton.x = 2048 - 200; // Right side with 200px margin saveButton.y = 2732 - 100; // Bottom with 100px margin game.addChild(saveButton); // Create score display var scoreText = new Text2('0', { size: 120, fill: 0xFFFFFF }); scoreText.anchor.set(0.5, 0); scoreText.setText(LK.getScore()); LK.gui.top.addChild(scoreText); // Create instruction text var instructionText = new Text2('Tap the button to earn points!', { size: 60, fill: 0xFFFFFF }); instructionText.anchor.set(0.5, 0); instructionText.y = 150; LK.gui.top.addChild(instructionText); game.update = function () { // Auto-tap logic if (autoTapLevel > 0) { autoTapTimer += 16.67; // Approximately 60 FPS, so ~16.67ms per frame if (autoTapTimer >= autoTapInterval) { autoTapTimer = 0; // Simulate tap on main button LK.setScore(LK.getScore() + pointsPerTap); scoreText.setText(LK.getScore()); LK.getSound('tapSound').play(); // Visual feedback for auto-tap tween(tapButton, { scaleX: 0.9, scaleY: 0.9 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(tapButton, { scaleX: 1.0, scaleY: 1.0 }, { duration: 100, easing: tween.easeOut }); } }); } } // Money rain logic if (moneyRainActive) { moneyRainTimer += 16.67; // Approximately 60 FPS if (moneyRainTimer >= moneyRainInterval) { moneyRainTimer = 0; // Create falling money at random X position var fallingMoney = new FallingMoney(); fallingMoney.x = Math.random() * (2048 - 200) + 100; // Random X within screen bounds fallingMoney.y = -50; // Start above screen fallingMoneyArray.push(fallingMoney); game.addChild(fallingMoney); } // Clean up destroyed money from array for (var i = fallingMoneyArray.length - 1; i >= 0; i--) { if (fallingMoneyArray[i].destroyed) { fallingMoneyArray.splice(i, 1); } } } // Subtle pulsing animation for the button when idle if (LK.ticks % 120 === 0) { tween(tapButton, { scaleX: 1.05, scaleY: 1.05 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { tween(tapButton, { scaleX: 1.0, scaleY: 1.0 }, { duration: 600, easing: tween.easeInOut }); } }); } };
===================================================================
--- original.js
+++ change.js
@@ -515,10 +515,15 @@
storage.paraGozLevel = 0;
storage.musicUpgradePurchased = false;
storage.paraGozLoveCount = 0;
storage.holdBonusFromLove = 0;
- // Restart the game
- LK.restart();
+ // Restart the game by destroying current game and creating new one
+ game.destroy();
+ game = new LK.Game({
+ backgroundColor: 0x808080
+ });
+ // Reload the entire game by re-executing the game code
+ location.reload();
};
self.up = function (x, y, obj) {
tween(self, {
scaleX: 1.0,
A red button. In-Game asset. 2d. High contrast. No shadows
gold money. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Super Mario'daki Wario karakteri ama madenci kılığında. In-Game asset. 2d. High contrast. No shadows
pembe kalp. In-Game asset. 2d. High contrast. No shadows