User prompt
marketteki "Shotgun" ögesi 1000 coin karşılığı satın alınsın
User prompt
sol alttaki "weapon" assetiyle kullanılan buton, marketteki "Shutgun ögesini satın alınca gelsin
User prompt
marketteki "Shotgun" silahının simgesi "weapon" assetiyle değiştirilsin
User prompt
marketteki "UZI" silahının simgesi "weapon2" assetiyle değiştirilsin
User prompt
marketteki "ROCKET LAUNCHER" yerine "Shotgun" yaz
User prompt
marketteki "PLASMA RIFLE" yerine "UZI" yaz
User prompt
markette iki silah daha satılsın
User prompt
sol alttaki düğmenin yanına "Tahta" malzemesinden bir buton yap ve üstünde "weapon2" assetinin simgesi olsun
User prompt
sol aşağıya "Tahta" malzemesinden bir buton yap ve üstünde "weapon" assetinin simgesi olsun
User prompt
ses kapatma ve müzik kapatma butonlarını sil
User prompt
"sol aşağıya "Tahta" malzemesinden bir buton yap ve üstünde "weapon" assetinin simgesi olsun" özelliğini kaldır
User prompt
sol aşağıya "Tahta" malzemesinden bir buton yap ve üstünde "weapon" assetinin simgesi olsun
User prompt
"player"ın yönü ve ateş ettiği yön fare imlecinin yerine göre değişsin
User prompt
basılı tutulan 0,25 saniye başı bir mermi gönderilsin
User prompt
basılı tutulan 0,5 saniye başı bir mermi gönderilsin
User prompt
basılı tutulan saniye başı bir mermi gönderilsin
User prompt
ekrana basılı tutarken ateş etmeye devam etsin
User prompt
farklı silahlara dair her şeyi sil
User prompt
"Oyunu durdurduğumuz menüye tekrar başlama ve markete erişme butonları ekle" özelliğini kaldır
User prompt
WEAPON SELECTION" kısmını düzenle
User prompt
"SHOTGUN" SİLAHINI KULLANMAK İÇİN TIKLANAN BUTONUN ÜSTÜNDEKİ SİLAH ICONU YERİNE "WeaponIcon2" kullanılsın
User prompt
WEAPON SELECTION EKRANIN ALT KISMINI TAMAMEN DOLDURSUN
User prompt
EKRANIN AŞAĞISINDAKİ "WEAPON SELECTION" HARİÇ NE VARSA SİL
User prompt
WEAPON SELECTION DAHA YUKARIDA OLSUN
User prompt
WEAPON SELECTION KISMI BİRAZ DAHA YUKARIDA OLSUN
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { healthUpgrades: 0, ammoUpgrades: 0, speedUpgrades: 0, coins: 0, healthUpgradeCost: 200, ammoUpgradeCost: 100, speedUpgradeCost: 300 }); /**** * Classes ****/ var BossZombie = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('bossZombie', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 0.5 + Math.random() * 0.3; // Slower than normal zombies self.health = 10; // Much higher health self.damage = 25; // Higher damage self.lastPlayerCollision = false; self.scaleX = 1.0; // Normal size self.scaleY = 1.0; self.update = function () { var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } var currentCollision = self.intersects(player); if (!self.lastPlayerCollision && currentCollision) { player.takeDamage(self.damage); // Boss zombie dies from collision but doesn't give coins self.health = 0; LK.effects.flashObject(self, 0xffffff, 100); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); } self.lastPlayerCollision = currentCollision; }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { LK.effects.flashObject(self, 0xffffff, 100); LK.setScore(LK.getScore() + 10000); // 10000 score for boss storage.coins += 10000; // 10000 coins for boss if (soundEnabled) LK.getSound('zombieHit').play(); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); // Show custom congratulations screen when boss is killed showCongratulations(); } }; return self; }); var Bullet = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('bullet', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 8; self.dx = 0; self.dy = 0; self.lifetime = 120; self.update = function () { self.x += self.dx * self.speed; self.y += self.dy * self.speed; // Rotate bullet to face movement direction graphics.rotation = Math.atan2(self.dy, self.dx); self.lifetime--; if (self.lifetime <= 0 || self.isOutOfBounds()) { self.remove(); return; } for (var i = 0; i < zombies.length; i++) { var zombie = zombies[i]; if (self.intersects(zombie)) { zombie.takeDamage(1); self.remove(); return; } } }; self.isOutOfBounds = function () { return self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732; }; self.remove = function () { var index = bullets.indexOf(self); if (index > -1) { bullets.splice(index, 1); } self.destroy(); }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.health = 100; self.maxHealth = 100; self.ammo = 30; self.maxAmmo = 30; self.shootCooldown = 0; self.baseShootCooldown = 10; self.update = function () { if (self.shootCooldown > 0) { self.shootCooldown--; } }; self.takeDamage = function (damage) { self.health -= damage; if (soundEnabled) LK.getSound('playerHit').play(); if (self.health <= 0) { self.health = 0; LK.effects.flashScreen(0xff0000, 1000); showCustomGameOver(); } else { LK.effects.flashObject(self, 0xff0000, 200); } }; self.canShoot = function () { return self.ammo > 0 && self.shootCooldown <= 0; }; self.shoot = function () { if (self.canShoot()) { self.ammo--; self.shootCooldown = self.baseShootCooldown; return true; } return false; }; return self; }); var Zombie = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('zombie', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 1 + Math.random() * 0.5; self.health = 1; self.damage = 10; self.lastPlayerCollision = false; self.update = function () { var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } var currentCollision = self.intersects(player); if (!self.lastPlayerCollision && currentCollision) { player.takeDamage(self.damage); // Zombie dies from collision but doesn't give coins self.health = 0; LK.effects.flashObject(self, 0xffffff, 100); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); } self.lastPlayerCollision = currentCollision; }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { LK.effects.flashObject(self, 0xffffff, 100); LK.setScore(LK.getScore() + 10); storage.coins += 100; zombiesKilledInWave++; // Track zombie kills if (soundEnabled) LK.getSound('zombieHit').play(); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); } }; return self; }); var Zombie2 = Container.expand(function () { var self = Container.call(this); var graphics = self.attachAsset('zombie2', { anchorX: 0.5, anchorY: 0.5 }); graphics.tint = 0xff6b6b; // Reddish tint to differentiate self.speed = 1 + Math.random() * 0.5; self.health = 1; self.damage = 10; self.lastPlayerCollision = false; self.update = function () { var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } var currentCollision = self.intersects(player); if (!self.lastPlayerCollision && currentCollision) { player.takeDamage(self.damage); // Zombie dies from collision but doesn't give coins self.health = 0; LK.effects.flashObject(self, 0xffffff, 100); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); } self.lastPlayerCollision = currentCollision; }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { LK.effects.flashObject(self, 0xffffff, 100); LK.setScore(LK.getScore() + 10); storage.coins += 100; zombiesKilledInWave++; // Track zombie kills if (soundEnabled) LK.getSound('zombieHit').play(); var index = zombies.indexOf(self); if (index > -1) { zombies.splice(index, 1); } self.destroy(); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2d2d2d }); /**** * Game Code ****/ var arena = game.attachAsset('arena', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 0.15, scaleY: 0.15 }); var player = game.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 / 2; player.scaleX = 1.0; player.scaleY = 1.0; // Apply stored upgrades player.maxHealth = 100 + storage.healthUpgrades * 20; player.health = player.maxHealth; player.maxAmmo = 30 + storage.ammoUpgrades * 10; player.ammo = player.maxAmmo; player.baseShootCooldown = Math.max(1, 10 - storage.speedUpgrades); var zombies = []; var bullets = []; var waveNumber = 1; var zombiesInWave = 5; var zombiesSpawned = 0; var spawnTimer = 0; var gameOverScreen = null; var showingGameOver = false; var showingMarket = false; var marketPanel = null; var isPaused = false; var pausePanel = null; var isBossWave = false; var isFirstShot = true; var zombiesKilledInWave = 0; var zombiesRequiredToKill = 8; // Upgrade costs that increase with each purchase - loaded from storage var healthUpgradeCost = storage.healthUpgradeCost; var ammoUpgradeCost = storage.ammoUpgradeCost; var speedUpgradeCost = storage.speedUpgradeCost; var weapon3Cost = 500; var weapon4Cost = 1000; var hasWeapon3 = storage.hasWeapon3 || false; var hasWeapon4 = storage.hasWeapon4 || false; var healthBackground = LK.getAsset('Tahta', { width: 300, height: 60, anchorX: 1, anchorY: 0, x: 0, y: 170 }); healthBackground.alpha = 0.7; LK.gui.topRight.addChild(healthBackground); var healthBar = new Text2('Health: 100', { size: 60, fill: 0xFF0000 }); healthBar.anchor.set(1, 0); healthBar.x = -10; healthBar.y = 170; LK.gui.topRight.addChild(healthBar); var ammoBackground = LK.getAsset('Tahta', { width: 300, height: 60, anchorX: 1, anchorY: 0, x: 0, y: 240 }); ammoBackground.alpha = 0.7; LK.gui.topRight.addChild(ammoBackground); var ammoDisplay = new Text2('Ammo: 30', { size: 60, fill: 0x00FF00 }); ammoDisplay.anchor.set(1, 0); ammoDisplay.x = -10; ammoDisplay.y = 240; LK.gui.topRight.addChild(ammoDisplay); var waveBackground = LK.getAsset('Tahta', { width: 300, height: 60, anchorX: 1, anchorY: 0, x: 0, y: 310 }); waveBackground.alpha = 0.7; LK.gui.topRight.addChild(waveBackground); var waveInfo = new Text2('Wave: 1', { size: 60, fill: 0xFFFF00 }); waveInfo.anchor.set(1, 0); waveInfo.x = -10; waveInfo.y = 310; LK.gui.topRight.addChild(waveInfo); var killProgressBackground = LK.getAsset('Tahta', { width: 350, height: 60, anchorX: 1, anchorY: 0, x: 0, y: 380 }); killProgressBackground.alpha = 0.7; LK.gui.topRight.addChild(killProgressBackground); var killProgress = new Text2('Kills: 0/8', { size: 60, fill: 0xFF6B6B }); killProgress.anchor.set(1, 0); killProgress.x = -10; killProgress.y = 380; LK.gui.topRight.addChild(killProgress); var scoreBackground = LK.getAsset('Tahta', { width: 350, height: 90, anchorX: 0.5, anchorY: 0, x: 0, y: 0 }); scoreBackground.alpha = 0.7; LK.gui.top.addChild(scoreBackground); var scoreDisplay = new Text2('SCORE: 0', { size: 80, fill: 0xFFFFFF }); scoreDisplay.anchor.set(0.5, 0); LK.gui.top.addChild(scoreDisplay); var coinBackground = LK.getAsset('Tahta', { width: 300, height: 70, anchorX: 0.5, anchorY: 0, x: 0, y: 90 }); coinBackground.alpha = 0.7; LK.gui.top.addChild(coinBackground); var coinDisplay = new Text2('COIN: ' + storage.coins, { size: 60, fill: 0xFFD700 }); coinDisplay.anchor.set(0.5, 0); coinDisplay.y = 90; LK.gui.top.addChild(coinDisplay); function showCustomGameOver() { if (showingGameOver) return; showingGameOver = true; gameOverScreen = new Container(); // Semi-transparent background var background = LK.getAsset('arena', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 4, scaleY: 4 }); background.alpha = 0.8; background.tint = 0x000000; gameOverScreen.addChild(background); // Game Over title var gameOverTitle = new Text2('GAME OVER', { size: 140, fill: 0xFF0000 }); gameOverTitle.anchor.set(0.5, 0.5); gameOverTitle.x = 2048 / 2; gameOverTitle.y = 2732 / 2 - 200; gameOverScreen.addChild(gameOverTitle); // Final score display var finalScore = new Text2('Final Score: ' + LK.getScore(), { size: 100, fill: 0xFFFFFF }); finalScore.anchor.set(0.5, 0.5); finalScore.x = 2048 / 2; finalScore.y = 2732 / 2 - 100; gameOverScreen.addChild(finalScore); // Market button var marketButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 50 }); marketButton.tint = 0x2196F3; marketButton.down = function (x, y, obj) { showMarket(); }; gameOverScreen.addChild(marketButton); var marketText = new Text2('MARKET', { size: 80, fill: 0xFFFFFF }); marketText.anchor.set(0.5, 0.5); marketText.x = 2048 / 2; marketText.y = 2732 / 2 + 50; gameOverScreen.addChild(marketText); // Restart button var restartButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 150 }); restartButton.tint = 0xFF5722; restartButton.down = function (x, y, obj) { restartGame(); }; gameOverScreen.addChild(restartButton); var restartText = new Text2('RESTART', { size: 80, fill: 0xFFFFFF }); restartText.anchor.set(0.5, 0.5); restartText.x = 2048 / 2; restartText.y = 2732 / 2 + 150; gameOverScreen.addChild(restartText); game.addChild(gameOverScreen); } function showCongratulations() { if (showingGameOver) return; showingGameOver = true; gameOverScreen = new Container(); // Fullscreen background with gradient effect var background = LK.getAsset('arena', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 5, scaleY: 5 }); background.alpha = 0.95; background.tint = 0x001122; gameOverScreen.addChild(background); // Main victory panel with wooden background var victoryPanel = LK.getAsset('Tahta', { width: 1600, height: 2000, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); victoryPanel.alpha = 0.98; victoryPanel.tint = 0x2a1810; gameOverScreen.addChild(victoryPanel); // Golden border effect var borderTop = LK.getAsset('Tahta', { width: 1600, height: 20, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 990 }); borderTop.tint = 0xFFD700; gameOverScreen.addChild(borderTop); var borderBottom = LK.getAsset('Tahta', { width: 1600, height: 20, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 990 }); borderBottom.tint = 0xFFD700; gameOverScreen.addChild(borderBottom); // Victory crown icon var crownIcon = new Text2('👑', { size: 200, fill: 0xFFD700 }); crownIcon.anchor.set(0.5, 0.5); crownIcon.x = 2048 / 2; crownIcon.y = 2732 / 2 - 700; gameOverScreen.addChild(crownIcon); // Main congratulations title with enhanced styling var congratsTitle = new Text2('CONGRATULATIONS', { size: 140, fill: 0xFFD700 }); congratsTitle.anchor.set(0.5, 0.5); congratsTitle.x = 2048 / 2; congratsTitle.y = 2732 / 2 - 500; gameOverScreen.addChild(congratsTitle); // Subtitle with glow effect var subtitle = new Text2('MISSION ACCOMPLISHED', { size: 80, fill: 0xFFFFFF }); subtitle.anchor.set(0.5, 0.5); subtitle.x = 2048 / 2; subtitle.y = 2732 / 2 - 400; gameOverScreen.addChild(subtitle); // Victory message with enhanced styling var victoryMessage = new Text2('🧟 BOSS ZOMBIE ELIMINATED 🧟', { size: 100, fill: 0x00FF88 }); victoryMessage.anchor.set(0.5, 0.5); victoryMessage.x = 2048 / 2; victoryMessage.y = 2732 / 2 - 280; gameOverScreen.addChild(victoryMessage); // Achievement section background var achievementBg = LK.getAsset('Tahta', { width: 1400, height: 300, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 80 }); achievementBg.alpha = 0.9; achievementBg.tint = 0x1a3d1a; gameOverScreen.addChild(achievementBg); // Achievement title var achievementTitle = new Text2('🏆 VICTORY REWARDS 🏆', { size: 90, fill: 0xFFD700 }); achievementTitle.anchor.set(0.5, 0.5); achievementTitle.x = 2048 / 2; achievementTitle.y = 2732 / 2 - 150; gameOverScreen.addChild(achievementTitle); // Score and rewards display var scoreReward = new Text2('💰 Score Bonus: +10,000', { size: 70, fill: 0xFFFFFF }); scoreReward.anchor.set(0.5, 0.5); scoreReward.x = 2048 / 2; scoreReward.y = 2732 / 2 - 80; gameOverScreen.addChild(scoreReward); var coinReward = new Text2('🪙 Coin Bonus: +10,000', { size: 70, fill: 0xFFD700 }); coinReward.anchor.set(0.5, 0.5); coinReward.x = 2048 / 2; coinReward.y = 2732 / 2 - 10; gameOverScreen.addChild(coinReward); // Final score display with enhanced styling var finalScoreBg = LK.getAsset('Tahta', { width: 1200, height: 120, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 120 }); finalScoreBg.alpha = 0.9; finalScoreBg.tint = 0x4a2c2a; gameOverScreen.addChild(finalScoreBg); var finalScore = new Text2('🎯 TOTAL SCORE: ' + LK.getScore(), { size: 90, fill: 0xFFFFFF }); finalScore.anchor.set(0.5, 0.5); finalScore.x = 2048 / 2; finalScore.y = 2732 / 2 + 120; gameOverScreen.addChild(finalScore); // Button section with enhanced styling var buttonSection = LK.getAsset('Tahta', { width: 1400, height: 350, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 400 }); buttonSection.alpha = 0.9; buttonSection.tint = 0x3a3a3a; gameOverScreen.addChild(buttonSection); // Market button with enhanced styling var marketButtonBg = LK.getAsset('Tahta', { width: 600, height: 120, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 320 }); marketButtonBg.alpha = 0.9; marketButtonBg.tint = 0x2196F3; gameOverScreen.addChild(marketButtonBg); var marketButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 320 }); marketButton.alpha = 0.01; marketButton.down = function (x, y, obj) { showMarket(); }; gameOverScreen.addChild(marketButton); var marketText = new Text2('🛒 UPGRADE SHOP', { size: 80, fill: 0xFFFFFF }); marketText.anchor.set(0.5, 0.5); marketText.x = 2048 / 2; marketText.y = 2732 / 2 + 320; gameOverScreen.addChild(marketText); // Restart button with enhanced styling var restartButtonBg = LK.getAsset('Tahta', { width: 600, height: 120, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 480 }); restartButtonBg.alpha = 0.9; restartButtonBg.tint = 0x4CAF50; gameOverScreen.addChild(restartButtonBg); var restartButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 480 }); restartButton.alpha = 0.01; restartButton.down = function (x, y, obj) { restartGame(); }; gameOverScreen.addChild(restartButton); var restartText = new Text2('🔄 NEW ADVENTURE', { size: 80, fill: 0xFFFFFF }); restartText.anchor.set(0.5, 0.5); restartText.x = 2048 / 2; restartText.y = 2732 / 2 + 480; gameOverScreen.addChild(restartText); // Victory quote at bottom var victoryQuote = new Text2('"The greatest victories are those achieved against impossible odds."', { size: 60, fill: 0xCCCCCC }); victoryQuote.anchor.set(0.5, 0.5); victoryQuote.x = 2048 / 2; victoryQuote.y = 2732 / 2 + 650; gameOverScreen.addChild(victoryQuote); // Add sparkle effects for (var i = 0; i < 8; i++) { var sparkle = new Text2('✨', { size: 60 + Math.random() * 40, fill: 0xFFD700 }); sparkle.anchor.set(0.5, 0.5); sparkle.x = 2048 / 2 + (Math.random() - 0.5) * 1200; sparkle.y = 2732 / 2 + (Math.random() - 0.5) * 1600; sparkle.alpha = 0.7 + Math.random() * 0.3; gameOverScreen.addChild(sparkle); } game.addChild(gameOverScreen); } function hideGameOver() { if (gameOverScreen) { gameOverScreen.destroy(); gameOverScreen = null; } showingGameOver = false; } function showMarket() { if (showingMarket) return; showingMarket = true; marketPanel = new Container(); // Semi-transparent background var background = LK.getAsset('arena', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 4, scaleY: 4 }); background.alpha = 0.95; background.tint = 0x1a1a1a; marketPanel.addChild(background); // Main market panel background var mainPanel = LK.getAsset('Tahta', { width: 1800, height: 2700, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); mainPanel.alpha = 0.95; mainPanel.tint = 0x2a2a2a; marketPanel.addChild(mainPanel); // Market title with enhanced styling var marketTitle = new Text2('🛒 MARKET', { size: 160, fill: 0xFFD700 }); marketTitle.anchor.set(0.5, 0.5); marketTitle.x = 2048 / 2; marketTitle.y = 2732 / 2 - 850; marketPanel.addChild(marketTitle); // Current coins display with enhanced styling var currentCoins = storage.coins; var coinPanel = LK.getAsset('Tahta', { width: 600, height: 120, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 700 }); coinPanel.alpha = 0.9; coinPanel.tint = 0x4a4a4a; marketPanel.addChild(coinPanel); var scoreText = new Text2('💰 COINS: ' + storage.coins, { size: 100, fill: 0xFFD700 }); scoreText.anchor.set(0.5, 0.5); scoreText.x = 2048 / 2; scoreText.y = 2732 / 2 - 700; marketPanel.addChild(scoreText); // Health upgrade section var healthSection = LK.getAsset('Tahta', { width: 1600, height: 200, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 450 }); healthSection.alpha = 0.8; healthSection.tint = 0x4CAF50; marketPanel.addChild(healthSection); var healthIcon = new Text2('❤️', { size: 120, fill: 0xFFFFFF }); healthIcon.anchor.set(0.5, 0.5); healthIcon.x = 2048 / 2 - 650; healthIcon.y = 2732 / 2 - 450; marketPanel.addChild(healthIcon); var healthTitle = new Text2('HEALTH BOOST', { size: 80, fill: 0xFFFFFF }); healthTitle.anchor.set(0, 0.5); healthTitle.x = 2048 / 2 - 550; healthTitle.y = 2732 / 2 - 480; marketPanel.addChild(healthTitle); var healthDesc = new Text2('+20 Max Health & Heal', { size: 60, fill: 0xE8F5E8 }); healthDesc.anchor.set(0, 0.5); healthDesc.x = 2048 / 2 - 550; healthDesc.y = 2732 / 2 - 420; marketPanel.addChild(healthDesc); var healthCost = new Text2('💰 ' + healthUpgradeCost, { size: 90, fill: storage.coins >= healthUpgradeCost ? 0xFFD700 : 0xFF4444 }); healthCost.anchor.set(1, 0.5); healthCost.x = 2048 / 2 + 650; healthCost.y = 2732 / 2 - 450; marketPanel.addChild(healthCost); var healthUpgrade = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 450 }); healthUpgrade.alpha = 0.01; healthUpgrade.down = function (x, y, obj) { if (storage.coins >= healthUpgradeCost) { storage.coins -= healthUpgradeCost; healthUpgradeCost = Math.floor(healthUpgradeCost * 1.5); // Increase cost by 50% storage.healthUpgradeCost = healthUpgradeCost; // Save to storage storage.healthUpgrades++; player.maxHealth += 20; player.health = Math.min(player.health + 20, player.maxHealth); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } }; marketPanel.addChild(healthUpgrade); // Ammo upgrade section var ammoSection = LK.getAsset('Tahta', { width: 1600, height: 200, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 200 }); ammoSection.alpha = 0.8; ammoSection.tint = 0x2196F3; marketPanel.addChild(ammoSection); var ammoIcon = new Text2('🔫', { size: 120, fill: 0xFFFFFF }); ammoIcon.anchor.set(0.5, 0.5); ammoIcon.x = 2048 / 2 - 650; ammoIcon.y = 2732 / 2 - 200; marketPanel.addChild(ammoIcon); var ammoTitle = new Text2('AMMO BOOST', { size: 80, fill: 0xFFFFFF }); ammoTitle.anchor.set(0, 0.5); ammoTitle.x = 2048 / 2 - 550; ammoTitle.y = 2732 / 2 - 230; marketPanel.addChild(ammoTitle); var ammoDesc = new Text2('+10 Max Ammo & Reload', { size: 60, fill: 0xE3F2FD }); ammoDesc.anchor.set(0, 0.5); ammoDesc.x = 2048 / 2 - 550; ammoDesc.y = 2732 / 2 - 170; marketPanel.addChild(ammoDesc); var ammoCost = new Text2('💰 ' + ammoUpgradeCost, { size: 90, fill: storage.coins >= ammoUpgradeCost ? 0xFFD700 : 0xFF4444 }); ammoCost.anchor.set(1, 0.5); ammoCost.x = 2048 / 2 + 650; ammoCost.y = 2732 / 2 - 200; marketPanel.addChild(ammoCost); var ammoUpgrade = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 - 200 }); ammoUpgrade.alpha = 0.01; ammoUpgrade.down = function (x, y, obj) { if (storage.coins >= ammoUpgradeCost) { storage.coins -= ammoUpgradeCost; ammoUpgradeCost = Math.floor(ammoUpgradeCost * 1.5); // Increase cost by 50% storage.ammoUpgradeCost = ammoUpgradeCost; // Save to storage storage.ammoUpgrades++; player.maxAmmo += 10; player.ammo = Math.min(player.ammo + 10, player.maxAmmo); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } }; marketPanel.addChild(ammoUpgrade); // Speed upgrade section var speedSection = LK.getAsset('Tahta', { width: 1600, height: 200, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 50 }); speedSection.alpha = 0.8; speedSection.tint = 0xFF9800; marketPanel.addChild(speedSection); var speedIcon = new Text2('⚡', { size: 120, fill: 0xFFFFFF }); speedIcon.anchor.set(0.5, 0.5); speedIcon.x = 2048 / 2 - 650; speedIcon.y = 2732 / 2 + 50; marketPanel.addChild(speedIcon); var speedTitle = new Text2('FIRE RATE BOOST', { size: 80, fill: 0xFFFFFF }); speedTitle.anchor.set(0, 0.5); speedTitle.x = 2048 / 2 - 550; speedTitle.y = 2732 / 2 + 20; marketPanel.addChild(speedTitle); var speedDesc = new Text2('Shoot Faster!', { size: 60, fill: 0xFFF3E0 }); speedDesc.anchor.set(0, 0.5); speedDesc.x = 2048 / 2 - 550; speedDesc.y = 2732 / 2 + 80; marketPanel.addChild(speedDesc); var speedCost = new Text2('💰 ' + speedUpgradeCost, { size: 90, fill: storage.coins >= speedUpgradeCost ? 0xFFD700 : 0xFF4444 }); speedCost.anchor.set(1, 0.5); speedCost.x = 2048 / 2 + 650; speedCost.y = 2732 / 2 + 50; marketPanel.addChild(speedCost); var speedUpgrade = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 50 }); speedUpgrade.alpha = 0.01; speedUpgrade.down = function (x, y, obj) { if (storage.coins >= speedUpgradeCost) { storage.coins -= speedUpgradeCost; speedUpgradeCost = Math.floor(speedUpgradeCost * 1.5); // Increase cost by 50% storage.speedUpgradeCost = speedUpgradeCost; // Save to storage storage.speedUpgrades++; player.baseShootCooldown = Math.max(1, player.baseShootCooldown - 1); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } }; marketPanel.addChild(speedUpgrade); // Upgrade status display var upgradeStatus = LK.getAsset('Tahta', { width: 1600, height: 150, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 750 }); upgradeStatus.alpha = 0.8; upgradeStatus.tint = 0x333333; marketPanel.addChild(upgradeStatus); var statusTitle = new Text2('📊 UPGRADE STATUS', { size: 70, fill: 0xFFFFFF }); statusTitle.anchor.set(0.5, 0.5); statusTitle.x = 2048 / 2; statusTitle.y = 2732 / 2 + 710; marketPanel.addChild(statusTitle); var statusText = new Text2('❤️ ' + storage.healthUpgrades + ' 🔫 ' + storage.ammoUpgrades + ' ⚡ ' + storage.speedUpgrades, { size: 70, fill: 0xFFD700 }); statusText.anchor.set(0.5, 0.5); statusText.x = 2048 / 2; statusText.y = 2732 / 2 + 790; marketPanel.addChild(statusText); // Weapon3 upgrade section var weapon3Section = LK.getAsset('Tahta', { width: 1600, height: 200, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 300 }); weapon3Section.alpha = 0.8; weapon3Section.tint = hasWeapon3 ? 0x666666 : 0x9C27B0; marketPanel.addChild(weapon3Section); var weapon3Icon = LK.getAsset('weapon2', { width: 60, height: 60, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 - 650, y: 2732 / 2 + 300 }); marketPanel.addChild(weapon3Icon); var weapon3Title = new Text2(hasWeapon3 ? 'UZI - OWNED' : 'UZI', { size: 80, fill: 0xFFFFFF }); weapon3Title.anchor.set(0, 0.5); weapon3Title.x = 2048 / 2 - 550; weapon3Title.y = 2732 / 2 + 270; marketPanel.addChild(weapon3Title); var weapon3Desc = new Text2('Triple Shot Burst', { size: 60, fill: 0xF3E5F5 }); weapon3Desc.anchor.set(0, 0.5); weapon3Desc.x = 2048 / 2 - 550; weapon3Desc.y = 2732 / 2 + 330; marketPanel.addChild(weapon3Desc); if (!hasWeapon3) { var weapon3Cost = new Text2('💰 ' + weapon3Cost, { size: 90, fill: storage.coins >= weapon3Cost ? 0xFFD700 : 0xFF4444 }); weapon3Cost.anchor.set(1, 0.5); weapon3Cost.x = 2048 / 2 + 650; weapon3Cost.y = 2732 / 2 + 300; marketPanel.addChild(weapon3Cost); var weapon3Upgrade = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 300 }); weapon3Upgrade.alpha = 0.01; weapon3Upgrade.down = function (x, y, obj) { if (storage.coins >= weapon3Cost) { storage.coins -= weapon3Cost; storage.hasWeapon3 = true; hasWeapon3 = true; coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } }; marketPanel.addChild(weapon3Upgrade); } // Weapon4 upgrade section var weapon4Section = LK.getAsset('Tahta', { width: 1600, height: 200, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 550 }); weapon4Section.alpha = 0.8; weapon4Section.tint = hasWeapon4 ? 0x666666 : 0xE91E63; marketPanel.addChild(weapon4Section); var weapon4Icon = LK.getAsset('weapon', { width: 60, height: 60, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 - 650, y: 2732 / 2 + 550 }); marketPanel.addChild(weapon4Icon); var weapon4Title = new Text2(hasWeapon4 ? 'Shotgun - OWNED' : 'Shotgun', { size: 80, fill: 0xFFFFFF }); weapon4Title.anchor.set(0, 0.5); weapon4Title.x = 2048 / 2 - 550; weapon4Title.y = 2732 / 2 + 520; marketPanel.addChild(weapon4Title); var weapon4Desc = new Text2('Explosive Area Damage', { size: 60, fill: 0xFCE4EC }); weapon4Desc.anchor.set(0, 0.5); weapon4Desc.x = 2048 / 2 - 550; weapon4Desc.y = 2732 / 2 + 580; marketPanel.addChild(weapon4Desc); if (!hasWeapon4) { var weapon4Cost = new Text2('💰 1000', { size: 90, fill: storage.coins >= 1000 ? 0xFFD700 : 0xFF4444 }); weapon4Cost.anchor.set(1, 0.5); weapon4Cost.x = 2048 / 2 + 650; weapon4Cost.y = 2732 / 2 + 550; marketPanel.addChild(weapon4Cost); var weapon4Upgrade = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 550 }); weapon4Upgrade.alpha = 0.01; weapon4Upgrade.down = function (x, y, obj) { if (storage.coins >= 1000) { storage.coins -= 1000; storage.hasWeapon4 = true; hasWeapon4 = true; coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } }; marketPanel.addChild(weapon4Upgrade); } // Enhanced close button var closeButtonBg = LK.getAsset('Tahta', { width: 800, height: 150, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 1200 }); closeButtonBg.alpha = 0.9; closeButtonBg.tint = 0x666666; marketPanel.addChild(closeButtonBg); var closeButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 + 1200 }); closeButton.alpha = 0.01; closeButton.down = function (x, y, obj) { hideMarket(); }; marketPanel.addChild(closeButton); var closeText = new Text2('❌ CLOSE MARKET', { size: 90, fill: 0xFFFFFF }); closeText.anchor.set(0.5, 0.5); closeText.x = 2048 / 2; closeText.y = 2732 / 2 + 1200; marketPanel.addChild(closeText); game.addChild(marketPanel); } function hideMarket() { if (marketPanel) { marketPanel.destroy(); marketPanel = null; } showingMarket = false; } function showPause() { if (isPaused) return; isPaused = true; pausePanel = new Container(); // Semi-transparent background var background = LK.getAsset('arena', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 3, scaleY: 3 }); background.alpha = 0.8; background.tint = 0x000000; pausePanel.addChild(background); // Pause menu panel with wooden background var pauseMenuBackground = LK.getAsset('Tahta', { width: 600, height: 500, anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); pauseMenuBackground.alpha = 0.9; pausePanel.addChild(pauseMenuBackground); // Pause title var pauseTitle = new Text2('PAUSE MENU', { size: 100, fill: 0xFFFFFF }); pauseTitle.anchor.set(0.5, 0.5); pauseTitle.x = 2048 / 2; pauseTitle.y = 2732 / 2 - 180; pausePanel.addChild(pauseTitle); // Continue button var continueButton = LK.getAsset('marketButton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); continueButton.down = function (x, y, obj) { hidePause(); }; pausePanel.addChild(continueButton); var continueText = new Text2('CONTINUE', { size: 60, fill: 0xFFFFFF }); continueText.anchor.set(0.5, 0.5); continueText.x = 2048 / 2; continueText.y = 2732 / 2; pausePanel.addChild(continueText); game.addChild(pausePanel); } function hidePause() { if (pausePanel) { pausePanel.destroy(); pausePanel = null; } isPaused = false; } function restartGame() { hideGameOver(); // Reset player with upgraded stats player.maxHealth = 100 + storage.healthUpgrades * 20; player.health = player.maxHealth; player.maxAmmo = 30 + storage.ammoUpgrades * 10; player.ammo = player.maxAmmo; player.baseShootCooldown = Math.max(1, 10 - storage.speedUpgrades); player.x = 2048 / 2; player.y = 2732 / 2; // Clear all entities for (var i = 0; i < zombies.length; i++) { zombies[i].destroy(); } zombies = []; for (var i = 0; i < bullets.length; i++) { bullets[i].destroy(); } bullets = []; // Reset game state waveNumber = 1; zombiesInWave = 5; zombiesSpawned = 0; spawnTimer = 0; isFirstShot = true; zombiesKilledInWave = 0; zombiesRequiredToKill = 8; LK.setScore(0); } function spawnZombie() { var zombie; // Check if this is a boss wave (every 15th wave) if (isBossWave) { zombie = new BossZombie(); } else { zombie = Math.random() < 0.5 ? new Zombie() : new Zombie2(); } // Define spawn locations around the arena edges var spawnLocations = [{ x: Math.random() * 2048, y: 100 }, // Top edge { x: Math.random() * 2048, y: 2632 }, // Bottom edge { x: 100, y: Math.random() * 2732 }, // Left edge { x: 1948, y: Math.random() * 2732 }, // Right edge { x: 300, y: 300 }, // Top-left corner { x: 1748, y: 300 }, // Top-right corner { x: 300, y: 2432 }, // Bottom-left corner { x: 1748, y: 2432 } // Bottom-right corner ]; // Pick a random spawn location from the predefined spots var spawnIndex = Math.floor(Math.random() * spawnLocations.length); var spawnPoint = spawnLocations[spawnIndex]; zombie.x = spawnPoint.x; zombie.y = spawnPoint.y; // Only apply scaling to non-boss zombies if (!isBossWave) { // Increase zombie health by 25% every 5 waves var healthMultiplier = Math.floor(waveNumber / 5) * 0.25; zombie.health = Math.floor(1 * (1 + healthMultiplier)); // Increase zombie speed by 25% every 15 waves var speedMultiplier = Math.floor(waveNumber / 15) * 0.25; zombie.speed = zombie.speed * (1 + speedMultiplier); // Increase zombie damage by 25% every 10 waves var damageMultiplier = Math.floor(waveNumber / 10) * 0.25; zombie.damage = Math.floor(zombie.damage * (1 + damageMultiplier)); zombie.scaleX = 1.0; zombie.scaleY = 1.0; } else { // Boss zombies get stronger each boss wave var bossWaveNumber = Math.floor(waveNumber / 15); zombie.health = 10 + bossWaveNumber * 5; // More health each boss wave zombie.damage = 25 + bossWaveNumber * 10; // More damage each boss wave } zombies.push(zombie); game.addChild(zombie); } function shootBullet(targetX, targetY) { if (player.shoot()) { var dx = targetX - player.x; var dy = targetY - player.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { // Normal weapon var bullet = new Bullet(); bullet.x = player.x; bullet.y = player.y; bullet.dx = dx / distance; bullet.dy = dy / distance; bullet.scaleX = 0.15; bullet.scaleY = 0.15; bullets.push(bullet); game.addChild(bullet); if (soundEnabled) LK.getSound('shoot').play(); } } } game.down = function (x, y, obj) { // Pause menu button clicks when paused if (isPaused) { // Continue button click if (x >= 2048 / 2 - 150 && x <= 2048 / 2 + 150 && y >= 2732 / 2 - 50 && y <= 2732 / 2 + 50) { hidePause(); return; } return; } if (showingGameOver) { // Market button click detection if (x >= 2048 / 2 - 150 && x <= 2048 / 2 + 150 && y >= 2732 / 2 + 10 && y <= 2732 / 2 + 90) { showMarket(); return; } // Restart button click detection if (x >= 2048 / 2 - 150 && x <= 2048 / 2 + 150 && y >= 2732 / 2 + 110 && y <= 2732 / 2 + 190) { restartGame(); return; } } else if (showingMarket) { var currentCoins = storage.coins; // Health upgrade button click if (x >= 2048 / 2 - 300 && x <= 2048 / 2 + 300 && y >= 2732 / 2 - 200 && y <= 2732 / 2 - 100) { if (storage.coins >= healthUpgradeCost) { storage.coins -= healthUpgradeCost; healthUpgradeCost = Math.floor(healthUpgradeCost * 1.5); // Increase cost by 50% storage.healthUpgradeCost = healthUpgradeCost; // Save to storage storage.healthUpgrades++; player.maxHealth += 20; player.health = Math.min(player.health + 20, player.maxHealth); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } return; } // Ammo upgrade button click if (x >= 2048 / 2 - 250 && x <= 2048 / 2 + 250 && y >= 2732 / 2 - 100 && y <= 2732 / 2 + 0) { if (storage.coins >= ammoUpgradeCost) { storage.coins -= ammoUpgradeCost; ammoUpgradeCost = Math.floor(ammoUpgradeCost * 1.5); // Increase cost by 50% storage.ammoUpgradeCost = ammoUpgradeCost; // Save to storage storage.ammoUpgrades++; player.maxAmmo += 10; player.ammo = Math.min(player.ammo + 10, player.maxAmmo); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } return; } // Speed upgrade button click if (x >= 2048 / 2 - 275 && x <= 2048 / 2 + 275 && y >= 2732 / 2 + 0 && y <= 2732 / 2 + 100) { if (storage.coins >= speedUpgradeCost) { storage.coins -= speedUpgradeCost; speedUpgradeCost = Math.floor(speedUpgradeCost * 1.5); // Increase cost by 50% storage.speedUpgradeCost = speedUpgradeCost; // Save to storage storage.speedUpgrades++; player.baseShootCooldown = Math.max(1, player.baseShootCooldown - 1); coinDisplay.setText('COIN: ' + storage.coins); LK.getSound('coinPurchase').play(); hideMarket(); showMarket(); // Refresh market display } return; } // Close button click if (x >= 2048 / 2 - 200 && x <= 2048 / 2 + 200 && y >= 2732 / 2 + 900 && y <= 2732 / 2 + 1000) { hideMarket(); return; } } else { isMouseDown = true; lastShootTarget.x = x; lastShootTarget.y = y; shootBullet(x, y); } }; game.up = function (x, y, obj) { isMouseDown = false; shootTimer = 0; // Reset timer when releasing }; game.move = function (x, y, obj) { if (showingGameOver || showingMarket || isPaused) { return; } currentMouseX = x; currentMouseY = y; // Update shoot target for continuous shooting lastShootTarget.x = x; lastShootTarget.y = y; }; game.update = function () { if (showingGameOver || showingMarket || isPaused) { return; } spawnTimer++; if (zombiesSpawned < zombiesInWave && spawnTimer >= 60) { spawnZombie(); zombiesSpawned++; spawnTimer = 0; } // Check if required zombies killed to progress wave if (zombiesKilledInWave >= zombiesRequiredToKill) { waveNumber++; zombiesKilledInWave = 0; // Calculate new required kills (25% more than previous wave) zombiesRequiredToKill = Math.ceil(zombiesRequiredToKill * 1.25); // Check if current wave is a boss wave (every 15th wave) isBossWave = waveNumber % 15 === 0; if (isBossWave) { zombiesInWave = 1; // Only 1 boss zombie } else { zombiesInWave = Math.min(5 + waveNumber * 2, 20); } zombiesSpawned = 0; } if (zombiesSpawned >= zombiesInWave && zombies.length === 0) { // Keep spawning zombies until kill requirement is met zombiesSpawned = 0; } // Check if player has no ammo and end game if (player.ammo <= 0) { LK.effects.flashScreen(0xff0000, 1000); showCustomGameOver(); return; } healthBar.setText('Health: ' + player.health); ammoDisplay.setText('Ammo: ' + player.ammo); scoreDisplay.setText('SCORE: ' + LK.getScore()); coinDisplay.setText('COIN: ' + storage.coins); waveInfo.setText('Wave: ' + waveNumber + (isBossWave ? ' (BOSS)' : '')); killProgress.setText('Kills: ' + zombiesKilledInWave + '/' + zombiesRequiredToKill); // Rotate player to face cursor var dx = currentMouseX - player.x; var dy = currentMouseY - player.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { player.rotation = Math.atan2(dy, dx); } // Continuous shooting when mouse/touch is held down shootTimer++; if (isMouseDown && player.canShoot() && shootTimer >= shootInterval) { shootBullet(lastShootTarget.x, lastShootTarget.y); shootTimer = 0; // Reset timer after shooting } for (var i = bullets.length - 1; i >= 0; i--) { bullets[i].update(); } for (var i = zombies.length - 1; i >= 0; i--) { zombies[i].update(); } }; var soundEnabled = true; var isMouseDown = false; var lastShootTarget = { x: 0, y: 0 }; var shootTimer = 0; var shootInterval = 15; // 15 ticks = 0.25 seconds at 60 FPS var currentMouseX = 2048 / 2; var currentMouseY = 2732 / 2; var musicPlaying = true; // Market button in top-right corner var topMarketButton = LK.getAsset('Tahta', { width: 120, height: 120, anchorX: 1, anchorY: 0, x: 0, y: 450 }); topMarketButton.alpha = 0.8; LK.gui.topRight.addChild(topMarketButton); var topMarketText = new Text2('🛒', { size: 80, fill: 0xFFFFFF }); topMarketText.anchor.set(0.5, 0.5); topMarketText.x = -60; topMarketText.y = 510; LK.gui.topRight.addChild(topMarketText); topMarketButton.down = function (x, y, obj) { if (!showingGameOver && !showingMarket && !isPaused) { showMarket(); } }; // Weapon button in bottom left corner var weaponButton = LK.getAsset('Tahta', { width: 120, height: 120, anchorX: 0, anchorY: 1, x: 0, y: 0 }); weaponButton.alpha = 0.8; LK.gui.bottomLeft.addChild(weaponButton); var weaponIcon = LK.getAsset('weapon', { width: 80, height: 80, anchorX: 0.5, anchorY: 0.5, x: 60, y: -60 }); weaponIcon.alpha = 0.9; LK.gui.bottomLeft.addChild(weaponIcon); weaponButton.down = function (x, y, obj) { if (hasWeapon4) { // Weapon already owned - show some feedback or switch weapon LK.effects.flashObject(weaponButton, 0x00ff00, 200); } else { // Show market for purchasing if (!showingGameOver && !showingMarket && !isPaused) { showMarket(); } } }; // Second weapon button next to the first one var weapon2Button = LK.getAsset('Tahta', { width: 120, height: 120, anchorX: 0, anchorY: 1, x: 130, y: 0 }); weapon2Button.alpha = 0.8; LK.gui.bottomLeft.addChild(weapon2Button); var weapon2Icon = LK.getAsset('weapon2', { width: 80, height: 80, anchorX: 0.5, anchorY: 0.5, x: 190, y: -60 }); weapon2Icon.alpha = 0.9; LK.gui.bottomLeft.addChild(weapon2Icon); weapon2Button.down = function (x, y, obj) { // Add weapon2 button functionality here if needed }; LK.playMusic('bgmusic'); ;
===================================================================
--- original.js
+++ change.js
@@ -1116,11 +1116,11 @@
weapon4Desc.x = 2048 / 2 - 550;
weapon4Desc.y = 2732 / 2 + 580;
marketPanel.addChild(weapon4Desc);
if (!hasWeapon4) {
- var weapon4Cost = new Text2('💰 ' + weapon4Cost, {
+ var weapon4Cost = new Text2('💰 1000', {
size: 90,
- fill: storage.coins >= weapon4Cost ? 0xFFD700 : 0xFF4444
+ fill: storage.coins >= 1000 ? 0xFFD700 : 0xFF4444
});
weapon4Cost.anchor.set(1, 0.5);
weapon4Cost.x = 2048 / 2 + 650;
weapon4Cost.y = 2732 / 2 + 550;
@@ -1132,10 +1132,10 @@
y: 2732 / 2 + 550
});
weapon4Upgrade.alpha = 0.01;
weapon4Upgrade.down = function (x, y, obj) {
- if (storage.coins >= weapon4Cost) {
- storage.coins -= weapon4Cost;
+ if (storage.coins >= 1000) {
+ storage.coins -= 1000;
storage.hasWeapon4 = true;
hasWeapon4 = true;
coinDisplay.setText('COIN: ' + storage.coins);
LK.getSound('coinPurchase').play();
Üstten görünümlü zombi. In-Game asset. 2d. High contrast. No shadows
Ortasında elips şeklinde bir boşluk hariç her yeri sık ağaçlık olan bir orman. In-Game asset. 2d. High contrast. No shadows
Ahşap tema. In-Game asset. 2d. High contrast. No shadows
pompalı tüfek mermisi. In-Game asset. 2d. High contrast. No shadows
hafif makineli tüfek mermisi. In-Game asset. 2d. High contrast. No shadows
Uzi çiz. In-Game asset. 2d. High contrast. No shadows
Pompalı Tüfek. In-Game asset. 2d. High contrast. No shadows
Bunun arkaplanını sil
Arkaplanını sil
boss zombie. In-Game asset. 2d. High contrast. No shadows
dümdüz sadece buzullardan oluşsun aralarında yarıklar olmasın