User prompt
intro girişi yapar mısın
User prompt
Please fix the bug: 'Timeout.tick error: LK.effects.shakeScreen is not a function' in or related to this line: 'LK.effects.shakeScreen(2, 600);' Line Number: 368
User prompt
evet yapalım
User prompt
son işlemi kaldır
User prompt
bana kullanılmayan satırları kırmızıya boya
User prompt
moonstone satırlarını sil
User prompt
I want you to delete the unused lines in the game
User prompt
Delete unused lines in the game
User prompt
kodda kullanılmayan satırları temizle
User prompt
portalın büyümesi 2 saniyede bitsin
User prompt
portal ilk göründüğünde nokta kadar yıldız olarak başlasın ve büyüsün
User prompt
portal ekranın sağında görünsün
User prompt
portal ekranın solunda görünsün
User prompt
portalın arkasındaki kırmızı görseli kaldır
User prompt
portal için portal görselini kullan
User prompt
portal görünsün
User prompt
portalın açılmıyor, açılması için ayarları sen yap
User prompt
portal ortaya çıksın
User prompt
boss patladıktan 2 saniye sonra portalın görünmesini aktif et
User prompt
Portal boss patladıktan 2 saniye sonra ekranın sağında görünsün
User prompt
portalın büyümesi için geçen süreyi 2 kat azalt
User prompt
portalın büyüme hızını 2 kat arttır
User prompt
portal büyümesidaha kısa sürsün
User prompt
playership sağlık barı 0 olduğunda oyun bitsin
User prompt
portal açılışını senin daha gerçekçi bir şekilde düzeltmeni istiyorum
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Asteroid - SAĞDAN SOLA var Asteroid = Container.expand(function () { var self = Container.call(this); var width = 120 + Math.random() * 60; var height = 120 + Math.random() * 60; var objAsset = self.attachAsset('spaceObject', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; objAsset.color = 0x888888; self.radius = width / 2; // Always spawn at right edge, random Y, move left self.x = 2048 + width; self.y = 200 + Math.random() * (2732 - 400); // Dynamic spawn effect: scale up and fade in self.scaleX = 0.6; self.scaleY = 0.6; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 400, easing: tween.easeOut }); // Speed will be set on spawn self.vx = -8; self.vy = (Math.random() - 0.5) * 2; self.update = function () { self.x += self.vx; self.y += self.vy; }; return self; }); // Mermi (Bullet) - SAĞA DOĞRU var Bullet = Container.expand(function () { var self = Container.call(this); var bulletAsset = self.attachAsset('bullet', { anchorX: 0.5, anchorY: 0.5 }); // Asset: ellipse, width: 32, height: 32, color: 0xffe066 bulletAsset.width = 32; bulletAsset.height = 32; bulletAsset.color = 0xffe066; self.speed = 18; // Rightwards (reduced speed) // Dynamic spawn effect: scale up and fade in self.scaleX = 0.5; self.scaleY = 0.5; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 200, easing: tween.easeOut }); self.update = function () { self.x += self.speed; }; return self; }); // EnemyBullet - DÜŞMAN MERMİSİ (sola doğru) var EnemyBullet = Container.expand(function () { var self = Container.call(this); var bulletAsset = self.attachAsset('dusmanmermi', { anchorX: 0.5, anchorY: 0.5 }); bulletAsset.width = 32; bulletAsset.height = 32; bulletAsset.color = 0xff4444; self.speed = -10; // Sola doğru (reduced speed) // Dynamic spawn effect: scale up and fade in self.scaleX = 0.5; self.scaleY = 0.5; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 200, easing: tween.easeOut }); self.update = function () { self.x += self.speed; }; return self; }); // EnemyShip - SAĞDAN SOLA var EnemyShip = Container.expand(function () { var self = Container.call(this); var width = 100; var height = 100; var objAsset = self.attachAsset('uzayNesnesi2', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; objAsset.color = 0xff4444; self.radius = width / 2; self.x = 2048 + width; self.y = 200 + Math.random() * (2732 - 400); // Dynamic spawn effect: scale up and fade in self.scaleX = 0.6; self.scaleY = 0.6; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 400, easing: tween.easeOut }); // Speed will be set on spawn self.vx = -10; self.vy = (Math.random() - 0.5) * 3; self.update = function () { self.x += self.vx; self.y += self.vy; }; return self; }); // MeteorStone - SAĞDAN SOLA, rastgele gelen düşman türü var MeteorStone = Container.expand(function () { var self = Container.call(this); var width = 120 + Math.random() * 60; var height = 120 + Math.random() * 60; var objAsset = self.attachAsset('meteorstone', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; self.radius = width / 2; // Always spawn at right edge, random Y, move left self.x = 2048 + width; self.y = 200 + Math.random() * (2732 - 400); // Dynamic spawn effect: scale up and fade in self.scaleX = 0.6; self.scaleY = 0.6; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 400, easing: tween.easeOut }); // Hız: asteroidlerden biraz daha hızlı olabilir var baseSpeed = 3 + Math.random() * 2; self.vx = -baseSpeed; self.vy = (Math.random() - 0.5) * 2.5; self.update = function () { self.x += self.vx; self.y += self.vy; }; return self; }); // Uzay Aracı (Player Ship) var PlayerShip = Container.expand(function () { var self = Container.call(this); // Ship asset: blue ellipse var shipAsset = self.attachAsset('playerShip', { anchorX: 0.5, anchorY: 0.5 }); // Asset will be created as: ellipse, width: 140, height: 100, color: 0x3a9cff shipAsset.width = 140; shipAsset.height = 100; shipAsset.color = 0x3a9cff; self.radius = 70; // For collision return self; }); // Uzay Cismi (Asteroid/Enemy) - SAĞDAN SOLA var SpaceObject = Container.expand(function () { var self = Container.call(this); // Randomly choose asteroid or enemy var isAsteroid = Math.random() < 0.7; var color = isAsteroid ? 0x888888 : 0xff4444; var width = isAsteroid ? 120 + Math.random() * 60 : 100; var height = isAsteroid ? 120 + Math.random() * 60 : 100; var objAsset = self.attachAsset('spaceObject', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; objAsset.color = color; self.radius = width / 2; // Always spawn at right edge, random Y, move left self.x = 2048 + width; self.y = 200 + Math.random() * (2732 - 400); // Dynamic spawn effect: scale up and fade in self.scaleX = 0.6; self.scaleY = 0.6; self.alpha = 0.0; tween(self, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 400, easing: tween.easeOut }); var speed = 6 + Math.random() * 4; self.vx = -speed; self.vy = (Math.random() - 0.5) * 2; // hafif yukarı/aşağı varyasyon self.update = function () { self.x += self.vx; self.y += self.vy; }; return self; }); /**** * Initialize Game ****/ // Create and add stars to the background var game = new LK.Game({ backgroundColor: 0x000010 }); /**** * Game Code ****/ // --- BAŞLANGIÇ MENÜSÜ --- // Modern ve görsel olarak zengin bir ana menü tasarımı var startMenuContainer = new Container(); // Menü renklerini dinamik olarak yönetmek için global değişkenler var menuBgColor = 0x181c2b; var menuButtonColors = [0x3a9cff, 0x4e5d94, 0x7cbb37, 0xf7b32b]; var menuWidth = 1000; var menuHeight = 1100; var startMenuBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: menuWidth / 2, y: menuHeight / 2, width: menuWidth, height: menuHeight }); startMenuBg.alpha = 0.97; startMenuBg.color = menuBgColor; startMenuContainer.addChild(startMenuBg); // Menü arka planına hafif bir border efekti ekle (arka planı büyütüp, daha koyu bir renk ile) // (Sadece görsel amaçlı, interaktif değil) var borderBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: menuWidth / 2, y: menuHeight / 2, width: menuWidth + 32, height: menuHeight + 32 }); borderBg.alpha = 0.25; borderBg.color = 0x000000; startMenuContainer.addChildAt(borderBg, 0); // Menü arka plan ve buton renklerini dinamik olarak güncelleyen fonksiyon function updateMenuColors(newBgColor, newButtonColors) { if (typeof newBgColor !== "undefined") { menuBgColor = newBgColor; if (startMenuBg) startMenuBg.color = menuBgColor; } if (Array.isArray(newButtonColors)) { menuButtonColors = newButtonColors; for (var i = 0; i < btnBgList.length; i++) { if (btnBgList[i]) btnBgList[i].color = menuButtonColors[i % menuButtonColors.length]; } } } // Başlık ve alt başlık var titleText = new Text2("UZAY MACERASI", { size: 120, fill: 0xFFE066 }); titleText.anchor.set(0.5, 0.5); titleText.x = menuWidth / 2; titleText.y = 140; startMenuContainer.addChild(titleText); // Subtitle text removed as requested // Dinamik butonlar var menuButtons = [{ label: "Yeni Oyun", key: "start", color: 0x3a9cff }, { label: "Seçenekler", key: "options", color: 0x4e5d94 }, { label: "Rekorlar", key: "scores", color: 0x7cbb37 }, { label: "Hakkında", key: "about", color: 0xf7b32b }]; var buttonHeight = 140; var buttonWidth = 600; var buttonSpacing = 48; var firstBtnY = 400; var btnBgList = []; var btnTextList = []; for (var i = 0; i < menuButtons.length; i++) { var btnY = firstBtnY + i * (buttonHeight + buttonSpacing); // Butonun arka planı (hafif gölgeli, modern) var btnBgShadow = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: menuWidth / 2 + 8, y: btnY + 10, width: buttonWidth + 24, height: buttonHeight + 18 }); btnBgShadow.alpha = 0.18; btnBgShadow.color = 0x000000; startMenuContainer.addChild(btnBgShadow); var btnBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: menuWidth / 2, y: btnY, width: buttonWidth, height: buttonHeight }); btnBg.alpha = 0.92; btnBg.color = menuButtonColors[i % menuButtonColors.length]; btnBg.menuKey = menuButtons[i].key; btnBg.buttonIndex = i; btnBg.interactive = true; // Buton tıklanabilir olsun btnBg.defaultAlpha = btnBg.alpha; // Tıklama efekti için orijinal alpha btnBg.down = function (btn) { return function (x, y, obj) { // Tıklama efekti: sadece bu buton için kısa bir görsel geri bildirim uygula btn.alpha = 0.65; tween(btn, { alpha: btn.defaultAlpha }, { duration: 120 }); // Her butonun kendi işlevi if (btn.menuKey === "start") { // Menü animasyonla kaybolsun ve oyun başlasın tween(startMenuContainer, { alpha: 0, scaleX: 1.2, scaleY: 1.2 }, { duration: 350, onFinish: function onFinish() { if (startMenuContainer && startMenuContainer.parent) startMenuContainer.destroy(); // Oyun başladığında süreyi 3 dakikaya (180 saniye) sıfırla timeLeft = gameDuration; updateTimerDisplay(); gameStarted = true; } }); } else { // Her menü butonu için yeni bir ekran (modal) aç // Ana menü ekranını gizle if (startMenuContainer && startMenuContainer.parent) { startMenuContainer.visible = false; } var modalW = 800; var modalH = 700; var modalContainer = new Container(); var modalBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: modalH / 2, width: modalW, height: modalH }); modalBg.alpha = 0.96; modalBg.color = 0x181c2b; modalContainer.addChild(modalBg); var modalTitle = ""; var modalContent = ""; if (btn.menuKey === "options") { modalTitle = "Seçenekler"; var urunler = ["Ekstra Can Paketi", "Mega Lazer", "Kalkan Güçlendirme", "Hız Artırıcı", "Süper Mermi", "Uzay Gemisi Kaplaması"]; modalContent = "Ürünler:\n"; for (var u = 0; u < urunler.length; u++) { modalContent += "- " + urunler[u] + "\n"; } } else if (btn.menuKey === "scores") { modalTitle = "Rekorlar"; modalContent = "Rekorlar: En yüksek skorlar yakında!"; } else if (btn.menuKey === "about") { modalTitle = "Hakkında"; modalContent = "Uzay Macerası - FRVR.Ava.Combo[POGAAS].v1.0"; } var modalTitleText = new Text2(modalTitle, { size: 100, fill: 0xFFE066, maxWidth: modalW - 80 // kutu kenarından taşmasın }); modalTitleText.anchor.set(0.5, 0.5); modalTitleText.x = modalW / 2; modalTitleText.y = 120; modalContainer.addChild(modalTitleText); var modalContentText = new Text2(modalContent, { size: 60, fill: "#fff", maxWidth: modalW - 80 // kutu kenarından taşmasın }); modalContentText.anchor.set(0.5, 0); modalContentText.x = modalW / 2; modalContentText.y = 220; modalContainer.addChild(modalContentText); // Kapat butonu var closeBtnW = 320; var closeBtnH = 100; // Move close button to the very bottom of the modal var closeBtnY = modalH - closeBtnH / 2 - 24; var closeBtnBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: closeBtnY, width: closeBtnW, height: closeBtnH }); closeBtnBg.alpha = 0.85; closeBtnBg.color = 0x3a9cff; closeBtnBg.interactive = true; closeBtnBg.down = function () { return function (x, y, obj) { if (modalContainer && modalContainer.parent) modalContainer.destroy(); // Modal kapatıldığında ana menüyü tekrar göster if (startMenuContainer && !startMenuContainer.parent) { startMenuContainer.visible = true; game.addChild(startMenuContainer); } }; }(); modalContainer.addChild(closeBtnBg); var closeBtnText = new Text2("Kapat", { size: 70, fill: "#fff" }); closeBtnText.anchor.set(0.5, 0.5); closeBtnText.x = modalW / 2; closeBtnText.y = closeBtnY; closeBtnText.interactive = true; closeBtnText.down = function (bgRef) { return function (x, y, obj) { if (bgRef && bgRef.down) bgRef.down(x, y, obj); }; }(closeBtnBg); modalContainer.addChild(closeBtnText); // Kapat butonu artık ana menüye döndürür closeBtnBg.down = function () { return function (x, y, obj) { if (modalContainer && modalContainer.parent) modalContainer.destroy(); // Modal kapatıldığında ana menüyü tekrar göster if (startMenuContainer) { startMenuContainer.visible = true; if (!startMenuContainer.parent) { game.addChild(startMenuContainer); } } }; }(); // Ortala ve ekrana ekle modalContainer.x = 2048 / 2 - modalW / 2; modalContainer.y = 2732 / 2 - modalH / 2; game.addChild(modalContainer); } }; }(btnBg); btnBgList.push(btnBg); startMenuContainer.addChild(btnBg); // Butonun üstüne hafif bir parlaklık efekti (degrade gibi) var btnHighlight = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: menuWidth / 2, y: btnY - buttonHeight / 3, width: buttonWidth * 0.92, height: buttonHeight * 0.38 }); btnHighlight.alpha = 0.18; btnHighlight.color = 0xffffff; startMenuContainer.addChild(btnHighlight); var btnText = new Text2(menuButtons[i].label, { size: 100, fill: "#fff", maxWidth: buttonWidth - 60 // buton kenarından taşmasın }); btnText.anchor.set(0.5, 0.5); btnText.x = menuWidth / 2; btnText.y = btnY; btnText.menuKey = menuButtons[i].key; btnText.buttonIndex = i; btnText.interactive = true; btnText.defaultAlpha = 1; btnText.down = function (btnBgRef, btnTextRef) { return function (x, y, obj) { // Text label dokunulduğunda kısa bir görsel geri bildirim uygula btnTextRef.alpha = 0.65; tween(btnTextRef, { alpha: btnTextRef.defaultAlpha }, { duration: 120 }); // Sadece kendi butonunun down fonksiyonunu tetikle if (btnBgRef && btnBgRef.down) { btnBgRef.down(x, y, obj); } }; }(btnBg, btnText); btnTextList.push(btnText); startMenuContainer.addChild(btnText); } // Bilgilendirici kısa açıklama var infoText = new Text2("Gemiyi sürükle, mermilerle uzay cisimlerini vur!", { size: 70, fill: "#fff", maxWidth: menuWidth - 80 // kutu kenarından taşmasın }); infoText.anchor.set(0.5, 0.5); infoText.x = menuWidth / 2; // Kırmızı bölümün altına hizala: kırmızı bölümün altı = startMenuBg.y + startMenuBg.height/2 infoText.y = startMenuBg.y + startMenuBg.height / 2 + 48; startMenuContainer.addChild(infoText); // Alt kısımda küçük bir imza var copyrightText = new Text2("© 2024 FRVR.Ava.Combo[POGAAS]", { size: 38, fill: 0xB0E0FF }); copyrightText.anchor.set(0.5, 0.5); copyrightText.x = menuWidth / 2; copyrightText.y = menuHeight - 32; startMenuContainer.addChild(copyrightText); // Ortala ve ekrana ekle startMenuContainer.x = 2048 / 2 - menuWidth / 2; startMenuContainer.y = 2732 / 2 - menuHeight / 2; game.addChild(startMenuContainer); // Menüde hareket edecek uzay gemisi kaldırıldı // Oyun başlamadan tüm kontrolleri ve update'i devre dışı bırak var gameStarted = false; // Pause icon is removed as requested // Ava: Dinamik duraklatma menüsü (Devam et, Yeniden başlat, Menü) var pauseMenuContainer = null; function showPauseMenu() { // Pause menu should not be shown in the main menu if (!gameStarted) return; if (pauseMenuContainer && pauseMenuContainer.parent) return; if (pauseMenuContainer) pauseMenuContainer.destroy(); var pauseMenuW = 800; var pauseMenuH = 700; pauseMenuContainer = new Container(); var pauseBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: pauseMenuW / 2, y: pauseMenuH / 2, width: pauseMenuW, height: pauseMenuH }); pauseBg.alpha = 0.93; pauseBg.color = 0x181c2b; pauseMenuContainer.addChild(pauseBg); var pauseTitle = new Text2("Oyun Duraklatıldı", { size: 110, fill: 0xFFE066 }); pauseTitle.anchor.set(0.5, 0.5); pauseTitle.x = pauseMenuW / 2; pauseTitle.y = 140; pauseMenuContainer.addChild(pauseTitle); // Yeni seçenek menüsü: Oyun duraklatıldığında ekrana gelsin var optionsMenuButtons = [{ label: "Devam et", key: "resume", color: 0x3a9cff }, { label: "Yeniden başlat", key: "restart", color: 0x7cbb37 }, { label: "Menü", key: "menu", color: 0xf7b32b }, { label: "Ses Ayarları", key: "sound", color: 0x4e5d94 }, { label: "Yardım", key: "help", color: 0x9b59b6 }]; var pBtnH = 110; var pBtnW = 420; var pBtnSpacing = 28; var pFirstBtnY = 260; for (var i = 0; i < optionsMenuButtons.length; i++) { var pBtnY = pFirstBtnY + i * (pBtnH + pBtnSpacing); var pBtnBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: pauseMenuW / 2, y: pBtnY, width: pBtnW, height: pBtnH }); pBtnBg.alpha = 0.85; pBtnBg.color = optionsMenuButtons[i].color; pBtnBg.pauseKey = optionsMenuButtons[i].key; pBtnBg.defaultAlpha = pBtnBg.alpha; pBtnBg.interactive = true; pBtnBg.down = function (btn) { return function (x, y, obj) { btn.alpha = 0.65; tween(btn, { alpha: btn.defaultAlpha }, { duration: 120 }); if (btn.pauseKey === "resume") { // Devam et: menüyü kapat, oyuna devam et if (pauseMenuContainer && pauseMenuContainer.parent) pauseMenuContainer.destroy(); gameStarted = true; } else if (btn.pauseKey === "restart") { // Yeniden başlat: oyunu baştan başlat LK.restartGame(); } else if (btn.pauseKey === "menu") { // Menü: ana menüyü göster, pause menüsünü kapat if (pauseMenuContainer && pauseMenuContainer.parent) pauseMenuContainer.destroy(); showMenu(); } else if (btn.pauseKey === "sound") { // Ses ayarları: yeni bir modal aç var modalW = 700; var modalH = 400; var modalContainer = new Container(); var modalBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: modalH / 2, width: modalW, height: modalH }); modalBg.alpha = 0.96; modalBg.color = 0x181c2b; modalContainer.addChild(modalBg); var modalTitle = new Text2("Ses Ayarları", { size: 80, fill: 0xFFE066, maxWidth: modalW - 60 }); modalTitle.anchor.set(0.5, 0.5); modalTitle.x = modalW / 2; modalTitle.y = 80; modalContainer.addChild(modalTitle); var modalContent = new Text2("Ses ayarları burada olacak.", { size: 50, fill: "#fff", maxWidth: modalW - 60 }); modalContent.anchor.set(0.5, 0); modalContent.x = modalW / 2; modalContent.y = 160; modalContainer.addChild(modalContent); // Kapat butonu var closeBtnW = 220; var closeBtnH = 80; var closeBtnY = modalH - 80; var closeBtnBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: closeBtnY, width: closeBtnW, height: closeBtnH }); closeBtnBg.alpha = 0.85; closeBtnBg.color = 0x3a9cff; closeBtnBg.interactive = true; closeBtnBg.down = function () { return function (x, y, obj) { if (modalContainer && modalContainer.parent) modalContainer.destroy(); }; }(); modalContainer.addChild(closeBtnBg); var closeBtnText = new Text2("Kapat", { size: 60, fill: "#fff" }); closeBtnText.anchor.set(0.5, 0.5); closeBtnText.x = modalW / 2; closeBtnText.y = closeBtnY; closeBtnText.interactive = true; closeBtnText.down = function (bgRef) { return function (x, y, obj) { if (bgRef && bgRef.down) bgRef.down(x, y, obj); }; }(closeBtnBg); modalContainer.addChild(closeBtnText); // Ortala ve ekrana ekle modalContainer.x = 2048 / 2 - modalW / 2; modalContainer.y = 2732 / 2 - modalH / 2; game.addChild(modalContainer); } else if (btn.pauseKey === "help") { // Yardım: yeni bir modal aç var modalW = 700; var modalH = 400; var modalContainer = new Container(); var modalBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: modalH / 2, width: modalW, height: modalH }); modalBg.alpha = 0.96; modalBg.color = 0x181c2b; modalContainer.addChild(modalBg); var modalTitle = new Text2("Yardım", { size: 80, fill: 0xFFE066, maxWidth: modalW - 60 }); modalTitle.anchor.set(0.5, 0.5); modalTitle.x = modalW / 2; modalTitle.y = 80; modalContainer.addChild(modalTitle); var modalContent = new Text2("Gemiyi sürükle, mermilerle uzay cisimlerini vur!", { size: 50, fill: "#fff", maxWidth: modalW - 60 }); modalContent.anchor.set(0.5, 0); modalContent.x = modalW / 2; modalContent.y = 160; modalContainer.addChild(modalContent); // Kapat butonu var closeBtnW = 220; var closeBtnH = 80; var closeBtnY = modalH - 80; var closeBtnBg = LK.getAsset('can', { anchorX: 0.5, anchorY: 0.5, x: modalW / 2, y: closeBtnY, width: closeBtnW, height: closeBtnH }); closeBtnBg.alpha = 0.85; closeBtnBg.color = 0x3a9cff; closeBtnBg.interactive = true; closeBtnBg.down = function () { return function (x, y, obj) { if (modalContainer && modalContainer.parent) modalContainer.destroy(); }; }(); modalContainer.addChild(closeBtnBg); var closeBtnText = new Text2("Kapat", { size: 60, fill: "#fff" }); closeBtnText.anchor.set(0.5, 0.5); closeBtnText.x = modalW / 2; closeBtnText.y = closeBtnY; closeBtnText.interactive = true; closeBtnText.down = function (bgRef) { return function (x, y, obj) { if (bgRef && bgRef.down) bgRef.down(x, y, obj); }; }(closeBtnBg); modalContainer.addChild(closeBtnText); // Ortala ve ekrana ekle modalContainer.x = 2048 / 2 - modalW / 2; modalContainer.y = 2732 / 2 - modalH / 2; game.addChild(modalContainer); } }; }(pBtnBg); pauseMenuContainer.addChild(pBtnBg); var pBtnText = new Text2(optionsMenuButtons[i].label, { size: 80, fill: "#fff", maxWidth: pBtnW - 40 // buton kenarından taşmasın }); pBtnText.anchor.set(0.5, 0.5); pBtnText.x = pauseMenuW / 2; pBtnText.y = pBtnY; pBtnText.interactive = true; pBtnText.defaultAlpha = 1; pBtnText.down = function (btnBgRef, btnTextRef) { return function (x, y, obj) { btnTextRef.alpha = 0.65; tween(btnTextRef, { alpha: btnTextRef.defaultAlpha }, { duration: 120 }); if (btnBgRef && btnBgRef.down) btnBgRef.down(x, y, obj); }; }(pBtnBg, pBtnText); pauseMenuContainer.addChild(pBtnText); } // Ortala ve ekrana ekle pauseMenuContainer.x = 2048 / 2 - pauseMenuW / 2; pauseMenuContainer.y = 2732 / 2 - pauseMenuH / 2; game.addChild(pauseMenuContainer); gameStarted = false; } // Ava: Menü oyun durduğunda tekrar gösterilsin function showMenu() { if (!startMenuContainer.parent) { startMenuContainer.alpha = 1; startMenuContainer.scaleX = 1; startMenuContainer.scaleY = 1; game.addChild(startMenuContainer); } // Oyun yeniden başlatıldığında süreyi 3 dakikaya (180 saniye) sıfırla timeLeft = gameDuration; updateTimerDisplay(); gameStarted = false; } // Ava: Oyun durdurulduğunda dinamik pause menüsünü göster game.onPause = function () { showPauseMenu(); }; // Ava: Oyun başlatıldığında menüyü gizle (mevcut animasyonlu kod korunuyor) // (Yukarıdaki "start" butonunun down fonksiyonu zaten menüyü yok ediyor ve gameStarted=true yapıyor.) // Sağlık, skor ve zaman göstergeleri her zaman görünür (oyun başlamadan önce de) // Bu kod bloğu kaldırıldı, göstergeler her zaman görünür olacak // Her butonun kendi down fonksiyonu var, menü container'ı routing yapmaz. // Tüm ekrana tıklama ile başlatma özelliği kaldırıldı, sadece butonlar bağımsız çalışır. // Moonstone spawn ayarları // Space background removed as requested var moonstones = []; // birden fazla aytaşı için dizi var moonstoneSpawnCooldown = 600; // moonstone 10 saniyede bir spawn olsun (600 tick ~10 saniye) var lastMoonstoneSpawnTick = -10000; // ilk başta hemen spawn olmasın // Birden fazla moonstone için hareket ve çarpışma kontrolü for (var m = moonstones.length - 1; m >= 0; m--) { var moonstone = moonstones[m]; moonstone.moonstoneMoveTick += 1; // X: Sola doğru sabit hızda hareket moonstone.x += moonstone.moonstoneVX; // Y: Orijinal konumundan, sinüs dalgası ile yukarı aşağı hareket moonstone.y = moonstone.baseY + Math.cos(moonstone.moonstoneMoveTick / (48 / moonstone.moonstoneMoveSpeed)) * moonstone.moonstoneAmpY; // Çarpışma kontrolü var moonstoneIntersect = isCircleHit(playerShip, moonstone); if (!moonstone.lastWasIntersecting && moonstoneIntersect) { // Moonstone alındı: skor +5, can +5, kısa animasyon, kaybolsun score += 5; scoreTxt.setText(score); updateDifficulty(); // Canı 5 artır, maksimumu aşmasın playerHealth = Math.min(playerHealth + 5, playerMaxHealth); updateCanBar(); updatePlayershipCanBar(); // Moonstone animasyon: hızlıca büyüyüp kaybolsun (function (moonstoneToDestroy, idx) { tween(moonstoneToDestroy, { scaleX: 2.2, scaleY: 2.2, alpha: 0 }, { duration: 350, onFinish: function onFinish() { if (moonstoneToDestroy) { moonstoneToDestroy.destroy(); // Diziden çıkar var index = moonstones.indexOf(moonstoneToDestroy); if (index !== -1) moonstones.splice(index, 1); } } }); })(moonstone, m); lastMoonstoneSpawnTick = LK.ticks; } moonstone.lastWasIntersecting = moonstoneIntersect; // Ekran dışına çıktıysa yok et if (moonstone.x < -200 || moonstone.y < -200 || moonstone.y > 2732 + 200) { moonstone.destroy(); moonstones.splice(m, 1); lastMoonstoneSpawnTick = LK.ticks; } } // Gift spawn ayarları var giftBg = null; var giftSpawnCooldown = 900; // gift nadiren spawn olsun (900 tick ~15 saniye) var lastGiftSpawnTick = -10000; // ilk başta hemen spawn olmasın function spawnGift() { if (giftBg) return; // gift zaten varsa tekrar oluşturma giftBg = LK.getAsset('gift', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2 + 600, y: 2732 / 2 - 400, width: 120, height: 120 }); giftBg.alpha = 0.95; game.addChild(giftBg); lastGiftSpawnTick = LK.ticks; } // Moonstone animasyonlu nesnesini spawn et function spawnMoonstone() { // Her çağrıda yeni bir moonstone oluştur var moonstone = LK.getAsset('moonstone', { anchorX: 0.5, anchorY: 0.5, x: 2048 + 70, y: 400 + Math.random() * (2732 - 800), width: 70, height: 70 }); moonstone.alpha = 0.92; game.addChild(moonstone); // Animasyon: hafifçe büyüyüp küçülme efekti (pulse) tween(moonstone, { scaleX: 1.18, scaleY: 1.18 }, { duration: 500, yoyo: true, repeat: 3, onFinish: function onFinish() { tween(moonstone, { scaleX: 1, scaleY: 1 }, { duration: 200 }); } }); moonstone.baseX = moonstone.x; moonstone.baseY = moonstone.y; moonstone.moonstoneMoveTick = Math.random() * 1000; moonstone.moonstoneMoveSpeed = 1.2 + Math.random() * 1.2; moonstone.moonstoneAmpY = 80 + Math.random() * 60; moonstone.moonstoneVX = -(2.5 + Math.random() * 2.5); moonstone.lastWasIntersecting = false; moonstones.push(moonstone); lastMoonstoneSpawnTick = LK.ticks; } // Oyun değişkenleri var scrollX = 0; // Ekranın sağa doğru ilerlemesini simüle eden global değişken var scrollSpeed = 8; // px/frame, sağa doğru ilerleme hızı (başlangıç değeri) var playerShip = new PlayerShip(); // Oyuncu gemisi sol alt köşeden sağa hareket edecek şekilde konumlandırılır playerShip.x = 350; playerShip.y = 2732 / 2; game.addChild(playerShip); var playerMaxHealth = 10; var playerHealth = playerMaxHealth; var bullets = []; var spaceObjects = []; var canShoot = true; var shootInterval = 250; // ms var lastShootTick = 0; var score = 0; var difficulty = 1; var spawnInterval = 90; // ticks var lastSpawnTick = 0; // Bölüm bitişi için toplam düşman sayacı ve kontrol değişkeni var totalEnemiesSpawned = 0; var levelFinished = false; // --- PLAYERSHIP CAN BAR (HEALTH BAR) --- // Health bar dimensions var playershipCanBarWidth = 400; var playershipCanBarHeight = 40; // Background bar var playershipCanBarBg = new Container(); var playershipCanBarBgRect = playershipCanBarBg.attachAsset('can', { anchorX: 0, anchorY: 0.5, x: 0, y: playershipCanBarHeight / 2, width: playershipCanBarWidth, height: playershipCanBarHeight }); playershipCanBarBgRect.alpha = 0.25; // Foreground bar var playershipCanBarFg = new Container(); var playershipCanBarFgRect = playershipCanBarFg.attachAsset('can', { anchorX: 0, anchorY: 0.5, x: 0, y: playershipCanBarHeight / 2, width: playershipCanBarWidth, height: playershipCanBarHeight }); playershipCanBarFgRect.alpha = 1; // Health bar container for positioning var playershipCanBarContainer = new Container(); playershipCanBarContainer.addChild(playershipCanBarBg); playershipCanBarContainer.addChild(playershipCanBarFg); // Position: top left, but not overlapping menu (leave 100px left and top margin) playershipCanBarContainer.x = 20; playershipCanBarContainer.y = 20; // Move to top left, just below top margin LK.gui.topLeft.addChild(playershipCanBarContainer); playershipCanBarContainer.visible = true; // Her zaman görünür // Animate health bar width and color function updatePlayershipCanBar() { var targetWidth = playershipCanBarWidth * Math.max(0, playerHealth) / playerMaxHealth; // Animate width using tween tween(playershipCanBarFgRect, { width: targetWidth }, { duration: 300 }); // Calculate color: green (full) to red (empty) // 0x00FF00 (green) to 0xFF0000 (red) var healthRatio = Math.max(0, Math.min(1, playerHealth / playerMaxHealth)); var r = Math.round(0xFF * (1 - healthRatio)); var g = Math.round(0xFF * healthRatio); var b = 0; var color = r << 16 | g << 8 | b; // Animate color using tween tween(playershipCanBarFgRect, { color: color }, { duration: 300 }); } updatePlayershipCanBar(); // --- Only one health bar is visible (playershipCanBar) --- // Animate health bar width and color function updateCanBar() { // Forward to playershipCanBar update for compatibility updatePlayershipCanBar(); } updateCanBar(); // Skor gösterimi var scoreTxt = new Text2('0', { size: 120, fill: "#fff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); scoreTxt.visible = true; // Her zaman görünür // Süre göstergesi (3 dakika = 180 saniye) var gameDuration = 180; // saniye var timeLeft = gameDuration; var timerTxt = new Text2('03:00', { size: 100, fill: "#fff" }); timerTxt.anchor.set(1, 0); // Anchor right edge LK.gui.topRight.addChild(timerTxt); // Add to right side of GUI timerTxt.visible = true; // Her zaman görünür // Timer'ı güncelleyen fonksiyon function updateTimerDisplay() { var min = Math.floor(timeLeft / 60); var sec = Math.floor(timeLeft % 60); var minStr = min < 10 ? "0" + min : "" + min; var secStr = sec < 10 ? "0" + sec : "" + sec; timerTxt.setText(minStr + ":" + secStr); } updateTimerDisplay(); // Her saniye zaman azaltıcı timer var timerInterval = LK.setInterval(function () { if (!gameStarted) return; if (levelFinished) return; if (timeLeft > 0) { timeLeft -= 1; if (timeLeft < 0) timeLeft = 0; updateTimerDisplay(); // Zaman bittiğinde oyunu otomatik olarak yeniden başlat if (timeLeft === 0) { LK.restartGame(); } } }, 1000); // Animate health bar width and color updateCanBar(); // Dokunma/sürükleme ile gemi hareketi var dragging = false; function handleMove(x, y, obj) { if (!gameStarted) return; if (dragging) { // Eğer portal büyüme animasyonu devam ediyorsa oyuncu hareket etmesin // maxScale'ı güncel olarak hesapla (her frame portal büyüme sınırı değişebilir) var portalCenterX = 2048 - 180; var portalOriginalWidth = 120; var maxPortalWidth = portalCenterX - 2048 / 2; var maxScale = maxPortalWidth / (portalOriginalWidth / 2); // Portal büyüme animasyonu sırasında hareket ettirme if (game.portal && !game.portal.isShrinking && game.portal.scaleX < maxScale) { return; } // Sınırları aşmasın - tüm ekranda serbest hareket var minX = playerShip.width / 2 + 40; var maxX = 2048 - playerShip.width / 2 - 40; var minY = playerShip.height / 2 + 40; var maxY = 2732 - playerShip.height / 2 - 40; // Sadece sürükleme sırasında, gemi mouse/touch ile birlikte hareket eder playerShip.x = Math.max(minX, Math.min(maxX, x)); playerShip.y = Math.max(minY, Math.min(maxY, y)); } } game.move = handleMove; game.down = function (x, y, obj) { // Sadece geminin üstüne tıklanırsa sürükleme başlasın if (!gameStarted) return; var dx = x - playerShip.x; var dy = y - playerShip.y; var r = playerShip.radius || (playerShip.width ? playerShip.width / 2 : 70); // maxScale'ı güncel olarak hesapla var portalCenterX = 2048 - 180; var portalOriginalWidth = 120; var maxPortalWidth = portalCenterX - 2048 / 2; var maxScale = maxPortalWidth / (portalOriginalWidth / 2); // Portal büyüme animasyonu devam ediyorsa sürükleme başlatılamasın if (game.portal && !game.portal.isShrinking && game.portal.scaleX < maxScale) { dragging = false; return; } if (dx * dx + dy * dy <= r * r) { dragging = true; handleMove(x, y, obj); } else { dragging = false; } }; game.up = function (x, y, obj) { if (!gameStarted) return; dragging = false; }; // Otomatik ateş (her shootInterval ms'de bir) function tryShoot() { if (!canShoot) return; var bullet = new Bullet(); // Mermi geminin sağ tarafından ateşlensin bullet.x = playerShip.x + playerShip.width / 2 + 10; bullet.y = playerShip.y; bullets.push(bullet); game.addChild(bullet); canShoot = false; LK.setTimeout(function () { canShoot = true; }, shootInterval); } // Uzay cismi oluştur function spawnSpaceObject() { // 0: uzayNesnesi2 (enemy), 1: spaceObject (asteroid), 2: meteorstone (yeni düşman) var rand = Math.random(); var obj; if (rand < 0.4) { // uzayNesnesi2 (enemy ship) obj = new Container(); var width = 100; var height = 100; var objAsset = obj.attachAsset('uzayNesnesi2', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; objAsset.color = 0xff4444; obj.radius = width / 2; obj.x = 2048 + width; obj.y = 200 + Math.random() * (2732 - 400); // Düşman hızı: kolayda yavaş, zorda hızlı // 1. zorlukta ~3, 10. zorlukta ~9 var baseSpeed = 3 + (difficulty - 1) * 0.7; var speed = baseSpeed + Math.random() * (1.5 + difficulty * 0.2); obj.vx = -speed; obj.vy = (Math.random() - 0.5) * (2.5 + difficulty * 0.2); // Enemy bullet fire timer obj.enemyBulletCooldown = 40 + Math.floor(Math.random() * 40); // ticks obj.lastEnemyBulletTick = LK.ticks; obj.update = function () { obj.x += obj.vx; obj.y += obj.vy; // Ateş etme (her cooldown süresi dolduğunda) if (LK.ticks - obj.lastEnemyBulletTick > obj.enemyBulletCooldown) { var eb = new EnemyBullet(); eb.x = obj.x - 60; eb.y = obj.y; if (!game.enemyBullets) game.enemyBullets = []; game.enemyBullets.push(eb); game.addChild(eb); obj.lastEnemyBulletTick = LK.ticks; obj.enemyBulletCooldown = 40 + Math.floor(Math.random() * 40); } }; } else if (rand < 0.8) { // spaceObject (asteroid) obj = new Container(); var width = 120 + Math.random() * 60; var height = 120 + Math.random() * 60; var objAsset = obj.attachAsset('spaceObject', { anchorX: 0.5, anchorY: 0.5 }); objAsset.width = width; objAsset.height = height; objAsset.color = 0x888888; obj.radius = width / 2; obj.x = 2048 + width; obj.y = 200 + Math.random() * (2732 - 400); // Asteroid hızı: kolayda yavaş, zorda hızlı // 1. zorlukta ~2.5, 10. zorlukta ~8 var baseSpeed = 2.5 + (difficulty - 1) * 0.6; var speed = baseSpeed + Math.random() * (1.5 + difficulty * 0.2); obj.vx = -speed; obj.vy = (Math.random() - 0.5) * (2 + difficulty * 0.2); obj.update = function () { obj.x += obj.vx; obj.y += obj.vy; }; } else { // meteorstone (yeni düşman) // MeteorStone: kolayda yavaş, zorda hızlı obj = new MeteorStone(); if (obj && obj.vx !== undefined) { // 1. zorlukta ~-3, 10. zorlukta ~-8 var meteorBaseSpeed = 3 + (difficulty - 1) * 0.6; obj.vx = -meteorBaseSpeed - Math.random() * (1.5 + difficulty * 0.2); obj.vy = (Math.random() - 0.5) * (2.5 + difficulty * 0.2); } } spaceObjects.push(obj); game.addChild(obj); // Düşman sayısını artır ve 10'a ulaştıysa win kontrolü totalEnemiesSpawned++; // (Kazanan kontrolü kaldırıldı) } // Çarpışma kontrolü (daire-çarpışma) function isCircleHit(a, b) { var dx = a.x - b.x; var dy = a.y - b.y; var dist = Math.sqrt(dx * dx + dy * dy); var r1 = a.radius || (a.width ? a.width / 2 : 0); var r2 = b.radius || (b.width ? b.width / 2 : 0); return dist < r1 + r2 - 10; } // Zorluk arttırma ve oyun hızını kademeli olarak artır function updateDifficulty() { // Zorluk: 1-10 arası, her 10 puanda bir artar, maksimum 10 var newDifficulty = 1 + Math.floor(score / 10); if (newDifficulty > 10) newDifficulty = 10; if (newDifficulty > difficulty) { difficulty = newDifficulty; } // spawnInterval: Kolayda yavaş (120), zorda hızlı (30) // 1. zorlukta 120, 10. zorlukta 30 spawnInterval = Math.round(120 - (difficulty - 1) * 10); if (spawnInterval < 30) spawnInterval = 30; } // Oyun döngüsü game.update = function () { if (!gameStarted) return; // Playership sağlık barı 0 olduğunda oyun bitsin if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } // Süreyi azalt (her frame ~1/60 saniye) // Artık sadece timerInterval ile zaman azalacak, burada azaltma yapılmıyor // 10 düşman spawn olduysa ve can > 0 ve süre > 0 ise win // (Kazanan kontrolü kaldırıldı) // Planets removed // Otomatik ateş // Portal büyüme veya küçülme animasyonu sırasında mermi atılmasın var portalBlockingShoot = false; if (game.portal && !game.portal.isShrinking && typeof game.portal.lastWasIntersecting !== "undefined" && game.portal.lastWasIntersecting) { portalBlockingShoot = true; } if (!portalBlockingShoot && LK.ticks - lastShootTick > Math.floor(shootInterval / 16)) { tryShoot(); lastShootTick = LK.ticks; } // Uzay cismi oluşturma if (!levelFinished && LK.ticks - lastSpawnTick > spawnInterval) { spawnSpaceObject(); lastSpawnTick = LK.ticks; } // Mermileri güncelle if (!(game.portal && !game.portal.isShrinking && game.portal.scaleX < (typeof maxScale !== "undefined" ? maxScale : 999))) { // Portal büyüme animasyonu sırasında mermiler yok edilir for (var i = bullets.length - 1; i >= 0; i--) { var b = bullets[i]; b.update(); // ScrollX uygula (tüm objeler sağa doğru ilerliyor gibi) b.x -= scrollSpeed; // Ekran dışıysa sil if (b.x > 2048 + 50) { b.destroy(); bullets.splice(i, 1); } } } else { // Portal büyüme animasyonu sırasında tüm mermileri yok et for (var i = bullets.length - 1; i >= 0; i--) { var b = bullets[i]; if (b && b.parent) { tween(b, { alpha: 0, scaleX: 0.2, scaleY: 0.2 }, { duration: 200, onFinish: function (bb) { return function () { if (bb && bb.parent) bb.destroy(); }; }(b) }); } } bullets = []; } // Uzay cisimlerini güncelle for (var j = spaceObjects.length - 1; j >= 0; j--) { var obj = spaceObjects[j]; obj.update(); // ScrollX uygula obj.x -= scrollSpeed; // Ekran dışıysa sil if (obj.x < -200 || obj.y < -200 || obj.y > 2732 + 200) { obj.destroy(); spaceObjects.splice(j, 1); continue; } // Gemiye çarptı mı? if (isCircleHit(obj, playerShip)) { // Patlama efekti (patlamaeffekt görseli ile) oyuncu gemisinin üstünde göster var explosion = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: playerShip.width || 140, height: playerShip.height || 100 }); game.addChild(explosion); tween(explosion, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { explosion.destroy(); } }); // Farklı düşman türlerine göre hasar uygula var damage = 1; if (obj instanceof MeteorStone) { damage = 3; } else if (obj.attachAsset && obj.attachAsset('spaceObject', { anchorX: 0.5, anchorY: 0.5 })) { // SpaceObject asteroid veya enemy, asteroid ise 1 birim damage = 1; } else if (obj.attachAsset && obj.attachAsset('uzayNesnesi2', { anchorX: 0.5, anchorY: 0.5 })) { // EnemyShip ise 1 birim (uzayNesnesi2) damage = 1; } playerHealth -= damage; updateCanBar(); updatePlayershipCanBar(); if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } obj.destroy(); spaceObjects.splice(j, 1); continue; } // Mermiyle çarpışma var _loop = function _loop() { b = bullets[k]; if (isCircleHit(obj, b)) { // Patlama efekti (patlamaeffekt görseli ile) explosion = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: obj.x, y: obj.y, width: obj.width || 100, height: obj.height || 100 }); game.addChild(explosion); tween(explosion, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { explosion.destroy(); } }); obj.destroy(); spaceObjects.splice(j, 1); b.destroy(); bullets.splice(k, 1); // Skor: meteorstone=2, spaceObject=1, enemy ship=3 scoreToAdd = 1; if (obj instanceof MeteorStone) { scoreToAdd = 2; } else if (obj.attachAsset && obj.attachAsset('uzayNesnesi2', { anchorX: 0.5, anchorY: 0.5 })) { scoreToAdd = 3; } score += scoreToAdd; scoreTxt.setText(score); updateDifficulty(); // Bölüm sonu: 10 düşman öldürüldüyse bitir if (!levelFinished) { if (typeof game.enemiesKilled === "undefined") game.enemiesKilled = 0; game.enemiesKilled++; if (game.enemiesKilled >= 10) { levelFinished = true; // Bölüm sonu canavarı görselini göster if (typeof game.bossImageShown === "undefined" || !game.bossImageShown) { var _flashBoss = function flashBoss() { if (!game.bossImg) return; tween(game.bossImg, { alpha: 1 }, { duration: 120, onFinish: function onFinish() { tween(game.bossImg, { alpha: 0 }, { duration: 120, onFinish: function onFinish() { flashCount++; if (flashCount < 3) { _flashBoss(); } else { // Sonunda kalıcı olarak görünür olsun tween(game.bossImg, { alpha: 1 }, { duration: 120 }); } } }); } }); }; // Sağda, birden yanıp sönerek beliren ve aşağı yukarı hareket eden boss bossImg = LK.getAsset('bolumsonucanavar', { anchorX: 0.5, anchorY: 0.5, // Ekranın sağında, ortalanmış şekilde göster x: 2048 - 200, y: 2732 / 2, width: 400, height: 400 }); bossImg.alpha = 0; game.addChild(bossImg); game.bossImageShown = true; game.bossImg = bossImg; game.bossAppearTick = LK.ticks; // Yanıp sönme animasyonu (3 kez) flashCount = 0; _flashBoss(); // Boss'un aşağı yukarı hareketi için tick kaydı game.bossBaseY = bossImg.y; // --- SADECE BÖLÜM SONU CANAVARI KALSIN --- // Tüm uzay cisimlerini sil for (var jj = spaceObjects.length - 1; jj >= 0; jj--) { if (spaceObjects[jj]) { spaceObjects[jj].destroy(); } } spaceObjects = []; // Tüm mermileri sil for (var ii = bullets.length - 1; ii >= 0; ii--) { if (bullets[ii]) { bullets[ii].destroy(); } } bullets = []; // Tüm düşman mermilerini sil if (game.enemyBullets) { for (var eb = game.enemyBullets.length - 1; eb >= 0; eb--) { if (game.enemyBullets[eb]) { game.enemyBullets[eb].destroy(); } } game.enemyBullets = []; } // Tüm moonstone'ları sil for (var mm = moonstones.length - 1; mm >= 0; mm--) { if (moonstones[mm]) { moonstones[mm].destroy(); } } moonstones = []; // Gift varsa sil if (giftBg) { giftBg.destroy(); giftBg = null; } } // Oyun bitmesin, win popup gösterme return { v: void 0 }; } } return 0; // break } }, b, explosion, scoreToAdd, bossImg, flashCount, _ret; for (var k = bullets.length - 1; k >= 0; k--) { _ret = _loop(); if (_ret === 0) break; if (_ret) return _ret.v; } } // Düşman mermileri güncelle ve çarpışma kontrolü if (game.enemyBullets) { for (var eb = game.enemyBullets.length - 1; eb >= 0; eb--) { var enemyBullet = game.enemyBullets[eb]; enemyBullet.update(); // ScrollX uygula enemyBullet.x -= scrollSpeed; // Ekran dışıysa sil if (enemyBullet.x < -100) { enemyBullet.destroy(); game.enemyBullets.splice(eb, 1); continue; } // Oyuncuya çarptı mı? if (isCircleHit(enemyBullet, playerShip)) { // Patlama efekti (patlamaeffekt görseli ile) oyuncu gemisinin üstünde göster var explosion = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: playerShip.width || 140, height: playerShip.height || 100 }); game.addChild(explosion); tween(explosion, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { explosion.destroy(); } }); playerHealth -= 2; updateCanBar(); updatePlayershipCanBar(); if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } enemyBullet.destroy(); game.enemyBullets.splice(eb, 1); continue; } } } // Boss varsa, ekranda merkeze kadar her yönde hareket ettir if (game.bossImg && game.bossBaseY !== undefined) { // --- BOSS MERMİSİ ATEŞLEME --- if (typeof game.bossBulletCooldown === "undefined") { game.bossBulletCooldown = 60 + Math.floor(Math.random() * 40); // 1-1.5 sn arası game.lastBossBulletTick = LK.ticks; if (!game.bossBullets) game.bossBullets = []; } // Boss 8 saniyede bir bossfire ateşlesin if (typeof game.lastBossFireTick === "undefined") { game.lastBossFireTick = LK.ticks; } // Bossfire ve bossmermi aynı anda ateşlenmesin var bossFireJustFired = false; if (LK.ticks - game.lastBossFireTick > 480) { // 8 saniye (60fps*8=480) // Bossfire aynı anda birkaç kez ateşlensin var fireCount = 3 + Math.floor(Math.random() * 2); // 3 veya 4 tane var spread = 120; // Y ekseninde yayılma mesafesi for (var f = 0; f < fireCount; f++) { var offsetY = -spread / 2 + spread / (fireCount - 1) * f; var bossFire = LK.getAsset('bossfire', { anchorX: 0.5, anchorY: 0.5, x: game.bossImg.x - (game.bossImg.width || 400) / 2 - 60, y: game.bossImg.y + offsetY, width: 80, height: 80 }); // Bossfire sadece sola doğru hareket etsin var speedFire = 13; // bossfire biraz hızlı gitsin bossFire.vx = -speedFire; bossFire.vy = 0; // Yanıcı (yakıcı) etki: çarptığında oyuncuya bir süre daha hasar vermeye devam etsin bossFire.burning = false; bossFire.burnTicks = 0; bossFire.update = function (fire) { return function () { fire.x += fire.vx; fire.y += fire.vy; // Yanıcı etki aktifse, görsel olarak hafif kırmızıya tintlenebilir (isteğe bağlı) if (fire.burning) { fire.alpha = 0.7 + 0.3 * Math.sin(LK.ticks / 4); } }; }(bossFire); if (!game.bossFires) game.bossFires = []; game.bossFires.push(bossFire); game.addChild(bossFire); } game.lastBossFireTick = LK.ticks; bossFireJustFired = true; } // Boss mermisi ateşle if (!bossFireJustFired && LK.ticks - game.lastBossBulletTick > game.bossBulletCooldown) { // Boss'un ateşleme slotları: üstten alta eşit aralıklı hizalı slotlar var slotCount = 5; var slotOffsets = []; var bossImgHeight = game.bossImg.height || 400; var slotSpacing = bossImgHeight / (slotCount + 1); for (var si = 0; si < slotCount; si++) { // slotlar boss görselinin üstünden altına eşit aralıklı var slotY = -bossImgHeight / 2 + slotSpacing * (si + 1); slotOffsets.push({ y: slotY, angle: 0 // düz gitsin, dağınık olmasın }); } for (var si = 0; si < slotOffsets.length; si++) { var slot = slotOffsets[si]; var bossBullet = LK.getAsset('bossmermi', { anchorX: 0.5, anchorY: 0.5, x: game.bossImg.x - (game.bossImg.width || 400) / 2 - 40, y: game.bossImg.y + slot.y, width: 48, height: 48 }); // Boss mermileri sadece sola doğru gitsin var speed = 10; // Reduced boss bullet speed bossBullet.vx = -speed; bossBullet.vy = 0; bossBullet.update = function (bullet) { return function () { bullet.x += bullet.vx; bullet.y += bullet.vy; }; }(bossBullet); game.bossBullets.push(bossBullet); game.addChild(bossBullet); } game.lastBossBulletTick = LK.ticks; game.bossBulletCooldown = 60 + Math.floor(Math.random() * 40); } // Bossfire mermilerini güncelle ve çarpışma kontrolü if (game.bossFires) { for (var bf = game.bossFires.length - 1; bf >= 0; bf--) { var fire = game.bossFires[bf]; if (fire.update) fire.update(); // ScrollX uygula fire.x -= scrollSpeed; // Ekran dışıysa sil if (fire.x < -150 || fire.x > 2048 + 150 || fire.y < -150 || fire.y > 2732 + 150) { fire.destroy(); game.bossFires.splice(bf, 1); continue; } // Oyuncuya çarptı mı? if (isCircleHit(fire, playerShip)) { // Eğer bossfire zaten yanıcı değilse, yanıcı etki başlat if (!fire.burning) { fire.burning = true; fire.burnTicks = 0; fire.burnMaxTicks = 90; // 1.5 saniye boyunca yanıcı etki (60fps*1.5) fire.burnDamageInterval = 18; // Her 0.3 saniyede bir hasar uygula fire.lastBurnDamageTick = LK.ticks; // Patlama efekti var bossFireHit = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: playerShip.width || 140, height: playerShip.height || 100 }); game.addChild(bossFireHit); tween(bossFireHit, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { bossFireHit.destroy(); } }); playerHealth -= 5; // bossfire hasarı 5 updateCanBar(); updatePlayershipCanBar(); if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } } // Yanıcı etkiyi oyuncunun üstünde bırak, mermiyi hemen yok etme // Mermiyi ekranda bırak, yanıcı etki bitince yok edilecek continue; } // Yanıcı (yakıcı) bossfire oyuncunun üstündeyse, periyodik hasar uygula if (fire.burning) { fire.burnTicks++; // Her burnDamageInterval tick'te bir hasar uygula if (fire.burnTicks === 1 || fire.burnTicks % fire.burnDamageInterval === 0) { playerHealth -= 1; updateCanBar(); updatePlayershipCanBar(); // Yanıcı efektin üstünde küçük bir alev efekti gösterebiliriz (isteğe bağlı) var burnEffect = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: 80, height: 80 }); burnEffect.alpha = 0.5; game.addChild(burnEffect); tween(burnEffect, { alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 200, onFinish: function onFinish() { burnEffect.destroy(); } }); if (playerHealth <= 0) { updateCanBar(); LK.showGameOver(); return; } } // Yanıcı etki süresi dolduysa bossfire'ı yok et if (fire.burnTicks > fire.burnMaxTicks) { fire.destroy(); game.bossFires.splice(bf, 1); continue; } } } } // Boss mermilerini güncelle ve çarpışma kontrolü for (var bb = game.bossBullets.length - 1; bb >= 0; bb--) { var bBullet = game.bossBullets[bb]; if (bBullet.update) bBullet.update(); // ScrollX uygula bBullet.x -= scrollSpeed; // Ekran dışıysa sil if (bBullet.x < -100 || bBullet.x > 2048 + 100 || bBullet.y < -100 || bBullet.y > 2732 + 100) { bBullet.destroy(); game.bossBullets.splice(bb, 1); continue; } // Oyuncuya çarptı mı? if (isCircleHit(bBullet, playerShip)) { // Patlama efekti var bossBulletHit = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: playerShip.width || 140, height: playerShip.height || 100 }); game.addChild(bossBulletHit); tween(bossBulletHit, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { bossBulletHit.destroy(); } }); playerHealth -= 3; // bossmermi hasarı 3 updateCanBar(); updatePlayershipCanBar(); if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } bBullet.destroy(); game.bossBullets.splice(bb, 1); continue; } } // Boss'un hareket yarıçapı: ekranın sağ yarısında, merkeze kadar gidebilsin // Merkez: (2048/2, 2732/2) // Boss'un hareket merkezi: ekranın sağında başlar, merkeze kadar hareket edebilir var centerX = 2048 / 2; var centerY = 2732 / 2; var rightEdgeX = 2048 - 200; var bossMoveRadiusX = (rightEdgeX - centerX) / 2; // sağdan merkeze kadar yarıçap var bossMoveRadiusY = (centerY - 0) * 0.8; // üstten alta merkeze kadar (biraz daha az) var bossCenterX = centerX + bossMoveRadiusX; var bossCenterY = centerY; // --- BOSS MERMİLERİNDEN KAÇMA ALGORİTMASI KALDIRILDI --- // Boss, ekrandaki boss mermilerinden kaçmaz, sadece dairesel hareket yapar var t = LK.ticks / 60; // yavaş hareket için var bossTargetX = bossCenterX + Math.cos(t) * bossMoveRadiusX; var bossTargetY = bossCenterY + Math.sin(t * 0.8) * bossMoveRadiusY; // Boss'un hedef pozisyonuna yumuşak geçiş (smooth movement) var lerp = function lerp(a, b, t) { return a + (b - a) * t; }; game.bossImg.x = lerp(game.bossImg.x, bossTargetX, 0.18); game.bossImg.y = lerp(game.bossImg.y, bossTargetY, 0.18); // --- BOSS CAN, HASAR ALMA, HASAR VERME --- // Boss canı başlat if (typeof game.bossHealth === "undefined") { game.bossHealth = 10; // Boss'un toplam canı artık 10 // Boss can barı game.bossHealthBarBg = new Container(); var bossBarBgRect = game.bossHealthBarBg.attachAsset('can', { anchorX: 0, anchorY: 0.5, x: 0, y: 20, width: 400, height: 40 }); bossBarBgRect.alpha = 0.25; game.bossHealthBarFg = new Container(); var bossBarFgRect = game.bossHealthBarFg.attachAsset('can', { anchorX: 0, anchorY: 0.5, x: 0, y: 20, width: 400, height: 40 }); bossBarFgRect.alpha = 1; game.bossHealthBarContainer = new Container(); game.bossHealthBarContainer.addChild(game.bossHealthBarBg); game.bossHealthBarContainer.addChild(game.bossHealthBarFg); // Boss can barı ekranın sağ üst köşesinde, timer'ın hemen altında göster game.bossHealthBarContainer.x = -400; // Offset for right alignment in gui.topRight game.bossHealthBarContainer.y = 100; // Just below timer LK.gui.topRight.addChild(game.bossHealthBarContainer); } // Boss can barını güncelle var bossTargetWidth = 400 * Math.max(0, game.bossHealth) / 10; tween(game.bossHealthBarFg.children[0], { width: bossTargetWidth }, { duration: 200 }); // Boss can barı rengi: yeşil (full) -> kırmızı (az) var bossHealthRatio = Math.max(0, Math.min(1, game.bossHealth / 10)); var br = Math.round(0xFF * (1 - bossHealthRatio)); var bg = Math.round(0xFF * bossHealthRatio); var bb = 0; var bossColor = br << 16 | bg << 8 | bb; tween(game.bossHealthBarFg.children[0], { color: bossColor }, { duration: 200 }); // Boss'a mermi çarpması kontrolü for (var bi = bullets.length - 1; bi >= 0; bi--) { var bossBullet = bullets[bi]; // Boss'un çarpışma yarıçapı: görselin yarısı var bossRadius = (game.bossImg.width || 400) / 2; var dx = bossBullet.x - game.bossImg.x; var dy = bossBullet.y - game.bossImg.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist < bossRadius + 16) { // Patlama efekti var bossHit = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: bossBullet.x, y: bossBullet.y, width: 80, height: 80 }); game.addChild(bossHit); tween(bossHit, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 300, onFinish: function onFinish() { bossHit.destroy(); } }); // Boss canı azalt game.bossHealth -= 2; if (game.bossHealth < 0) game.bossHealth = 0; // Mermiyi yok et bossBullet.destroy(); bullets.splice(bi, 1); // Boss öldü mü? if (game.bossHealth <= 0) { // Boss patlama efekti var bossExplosion = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: game.bossImg.x, y: game.bossImg.y, width: game.bossImg.width || 400, height: game.bossImg.height || 400 }); game.addChild(bossExplosion); tween(bossExplosion, { alpha: 0, scaleX: 3, scaleY: 3 }, { duration: 800, onFinish: function onFinish() { bossExplosion.destroy(); } }); // Boss'u yok et game.bossImg.destroy(); game.bossImg = null; // Boss can barını yok et if (game.bossHealthBarContainer) { game.bossHealthBarContainer.destroy(); game.bossHealthBarContainer = null; } // Skor bonusu score += 20; scoreTxt.setText(score); updateDifficulty(); // --- PORTAL EKLE --- if (!game.portal) { // Portal spawn'u boss patladıktan 2 saniye (120 tick) sonra gerçekleşsin if (typeof game.portalSpawnDelayTick === "undefined") { game.portalSpawnDelayTick = LK.ticks; // Boss öldüğü anı kaydet game.portalSpawned = false; game.portalCanAppear = false; // 2 saniye (120 tick) sonra portal görünmesini aktif et LK.setTimeout(function () { game.portalCanAppear = true; }, 2000); } // Portal görünmesini her durumda aktif et if (!game.portalSpawned && (game.portalCanAppear || true)) { // Portal küçük ve gerçekçi bir açılış animasyonu ile oluşsun var portal = LK.getAsset('portal', { anchorX: 0.5, anchorY: 0.5, x: 2048 - 180, // Ekranın sağında görünsün y: 2732 / 2, width: 120, height: 120 }); // Portal ilk başta nokta kadar küçük ve parlak bir yıldız gibi başlasın portal.scaleX = 0.01; portal.scaleY = 0.01; portal.alpha = 0.0; game.addChild(portal); game.portal = portal; // Portal'ın arkasındaki kırmızı görsel kaldırıldı, sadece portal animasyonu uygulanıyor // Yıldız gibi parlayarak görünme ve büyüme animasyonu tween(portal, { alpha: 1, scaleX: 0.12, scaleY: 0.12 }, { duration: 120, easing: tween.easeOut, onFinish: function onFinish() { // Hafif bir parıltı efekti için kısa bir büyüme ve geri küçülme (pulse) tween(portal, { scaleX: 0.18, scaleY: 0.18 }, { duration: 80, yoyo: true, repeat: 1, onFinish: function onFinish() { // Sonra portal büyümeye başlasın tween(portal, { scaleX: 1.2, scaleY: 1.2 }, { duration: 2000, easing: tween.easeOutBack }); } }); } }); game.portalSpawned = true; } } // Oyun bitmesin, win popup gösterme return; } } } // Boss oyuncuya çarparsa hasar versin if (playerShip && game.bossImg) { var dxp = playerShip.x - game.bossImg.x; var dyp = playerShip.y - game.bossImg.y; var distp = Math.sqrt(dxp * dxp + dyp * dyp); var bossRadius = (game.bossImg.width || 400) / 2; var playerRadius = playerShip.radius || (playerShip.width ? playerShip.width / 2 : 70); if (distp < bossRadius + playerRadius - 20) { // Sadece ilk çarpışmada hasar uygula (her frame değil) if (!game.bossLastPlayerHit) { // Patlama efekti var bossPlayerHit = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: playerShip.x, y: playerShip.y, width: playerShip.width || 140, height: playerShip.height || 100 }); game.addChild(bossPlayerHit); tween(bossPlayerHit, { alpha: 0, scaleX: 2, scaleY: 2 }, { duration: 400, onFinish: function onFinish() { bossPlayerHit.destroy(); } }); playerHealth -= 5; updateCanBar(); updatePlayershipCanBar(); if (playerHealth <= 0) { updateCanBar(); updatePlayershipCanBar(); LK.showGameOver(); return; } game.bossLastPlayerHit = true; } } else { game.bossLastPlayerHit = false; } } } // Her frame scrollX'i artır (ekran sağa doğru ilerliyor gibi) scrollX += scrollSpeed; // Portal dinamik efekt: sadece büyüme ve renk döngüsü (nabız efekti kaldırıldı) if (game.portal) { // Portal'ın büyüme oranı, ekranın sağının yarısına kadar olacak şekilde ayarlanır // Portal'ın merkez X'i: 2048 - 180 (oluşturulma noktası) // Portal'ın orijinal genişliği: 120 // Maksimum büyüme: portalın merkezi, ekranın sağ kenarından ekranın ortasına kadar olan mesafenin yarısı kadar büyüyebilir var portalCenterX = 2048 - 180; var portalOriginalWidth = 120; var maxPortalWidth = portalCenterX - 2048 / 2; // sağ kenardan merkeze kadar olan mesafe var maxScale = maxPortalWidth / (portalOriginalWidth / 2); // scaleX, scaleY için // Büyüme animasyonu: 1.2'den başlayıp maxScale'e kadar büyüsün if (typeof game.portal.isShrinking === "undefined") game.portal.isShrinking = false; if (typeof game.portal.lastWasIntersecting === "undefined") game.portal.lastWasIntersecting = false; // Renk döngüsü (HSV'den RGB'ye basit dönüşüm) var t = LK.ticks % 360 / 360; var h = t, s = 0.7, v = 1.0; var i = Math.floor(h * 6); var f = h * 6 - i; var p = v * (1 - s); var q = v * (1 - f * s); var r, g, b; switch (i % 6) { case 0: r = v, g = q, b = p; break; case 1: r = q, g = v, b = p; break; case 2: r = p, g = v, b = q; break; case 3: r = p, g = q, b = v; break; case 4: r = q, g = p, b = v; break; case 5: r = v, g = p, b = q; break; } var color = Math.round(r * 255) << 16 | Math.round(g * 255) << 8 | Math.round(b * 255); game.portal.color = color; // Portal büyüme/küçülme kontrolü if (!game.portal.isShrinking) { var grow = 1.2 + Math.min(maxScale - 1.2, (LK.ticks - game.lastBossFireTick) * 0.01); game.portal.scaleX = grow; game.portal.scaleY = grow; } // Oyuncu gemisi portal ile temas etti mi? var portalIntersect = false; if (playerShip && !game.portal.isShrinking) { // Portal ve gemi çarpışma kontrolü (daire-çarpışma) var dx = playerShip.x - game.portal.x; var dy = playerShip.y - game.portal.y; var portalRadius = (game.portal.width ? game.portal.width / 2 : 60) * game.portal.scaleX; var playerRadius = playerShip.radius || (playerShip.width ? playerShip.width / 2 : 70); var dist = Math.sqrt(dx * dx + dy * dy); portalIntersect = dist < portalRadius + playerRadius - 10; if (!game.portal.lastWasIntersecting && portalIntersect) { // Gemi portalın içine girdi: gemi ve mermiler kaybolsun, portal küçülüp ışık patlamasıyla kaybolsun // Gemi kaybolsun (görsel olarak) if (playerShip && playerShip.parent) { tween(playerShip, { alpha: 0, scaleX: 0.2, scaleY: 0.2 }, { duration: 400, onFinish: function onFinish() { if (playerShip && playerShip.parent) { playerShip.destroy(); } } }); } // Tüm mermileri kaybolma animasyonuyla yok et for (var i = bullets.length - 1; i >= 0; i--) { var b = bullets[i]; if (b && b.parent) { tween(b, { alpha: 0, scaleX: 0.2, scaleY: 0.2 }, { duration: 300, onFinish: function (bb) { return function () { if (bb && bb.parent) bb.destroy(); }; }(b) }); } } bullets = []; // Portal küçülmeye başlasın game.portal.isShrinking = true; tween(game.portal, { scaleX: 0.1, scaleY: 0.1, alpha: 0.0 }, { duration: 900, easing: tween.easeIn, onFinish: function onFinish() { // Işık patlaması efekti if (game.portal && game.portal.parent) { var portalExplosion = LK.getAsset('patlamaeffekt', { anchorX: 0.5, anchorY: 0.5, x: game.portal.x, y: game.portal.y, width: (game.portal.width || 120) * (game.portal.scaleX || 1.0) * 2.2, height: (game.portal.height || 120) * (game.portal.scaleY || 1.0) * 2.2 }); portalExplosion.alpha = 0.85; game.addChild(portalExplosion); tween(portalExplosion, { alpha: 0, scaleX: 2.5, scaleY: 2.5 }, { duration: 500, onFinish: function onFinish() { if (portalExplosion && portalExplosion.parent) portalExplosion.destroy(); // Portal tamamen kaybolduktan sonra win ekranı göster LK.showYouWin(); } }); game.portal.destroy(); game.portal = null; } } }); } game.portal.lastWasIntersecting = portalIntersect; } } // Static Saturn removed as requested // Gift spawn: gift yoksa ve spawn süresi dolduysa nadiren spawn et if (!giftBg && LK.ticks - lastGiftSpawnTick > giftSpawnCooldown) { // %80 olasılıkla gift spawn et if (Math.random() < 0.8) { spawnGift(); } else { // spawn denemesi başarısızsa tekrar denemek için tick'i güncelleme lastGiftSpawnTick = LK.ticks; } } // Moonstone spawn: ekranda en fazla 3 moonstone olsun, spawn süresi dolduysa rastgele spawn et if (moonstones.length < 3 && LK.ticks - lastMoonstoneSpawnTick > moonstoneSpawnCooldown) { // %60 olasılıkla moonstone spawn et if (Math.random() < 0.6) { spawnMoonstone(); } else { lastMoonstoneSpawnTick = LK.ticks; } } // Gift görselini sağa ve aşağıya doğru çapraz kaydır (parallax efekti, saturn'den daha hızlı ama ana objelerden yavaş) // Ava: Sağ alttaki nesne (gift) kaldırıldı. if (giftBg) { giftBg.destroy(); giftBg = null; } };
===================================================================
--- original.js
+++ change.js
@@ -902,9 +902,8 @@
moonstones.splice(m, 1);
lastMoonstoneSpawnTick = LK.ticks;
}
}
-function showSaturnOnce() {}
// Gift spawn ayarları
var giftBg = null;
var giftSpawnCooldown = 900; // gift nadiren spawn olsun (900 tick ~15 saniye)
var lastGiftSpawnTick = -10000; // ilk başta hemen spawn olmasın
düşman uzay gemisi. In-Game asset. 2d. High contrast. No shadows
patlama efekti. In-Game asset. 2d. High contrast. No shadows
mermi yönünü sağa çevir ve yat
satürn. In-Game asset. 2d. High contrast. No shadows
meteor taşı. In-Game asset. 2d. High contrast. No shadows
bölüm sonu canavar için devasa uzay gemisi. In-Game asset. 2d. High contrast. No shadows
rengini değiştir
ışın mermisi. In-Game asset. 2d. High contrast. No shadows
yanan ateş topları. In-Game asset. 2d. High contrast. No shadows
oyunda açılacak bir uzay portalı için görüntüyü netleştir
A magical sci-fi starburst explosion for a 2D game effect, with a bright blue and white energy core bursting outward in radiant spikes, surrounded by glowing particles, swirling light trails, and a soft nebula-like aura. The effect should feel like a powerful portal discharge or dimensional rift opening, with dynamic energy and cinematic glow. Transparent background, digital art style, top-down angle, ideal for sprite use in games.. In-Game asset. 2d. High contrast. No shadows
A stunning 2D top-down galaxy for a space-themed game background, featuring a massive spiral galaxy with swirling arms in vibrant shades of blue, purple, and pink, a bright glowing core, scattered star clusters, distant nebulae, and a few small planets orbiting around. The galaxy should feel colorful, mysterious, and vast, with soft glowing effects and high contrast for a sci-fi aesthetic. Style: digital art, seamless background, suitable for looping game parallax layers.. In-Game asset. 2d. High contrast. No shadows
kalkanın içinde gemi olmasın
A 2D sci-fi gift box or power-up crate floating in space, with a glowing metallic surface, futuristic design, bright neon blue and silver accents, and a soft pulsing light effect. The box should look valuable and mysterious, slightly levitating with subtle sparkles or energy rings around it. Designed for a top-down space shooter game. Transparent background, digital art, ideal for sprite use.. In-Game asset. 2d. High contrast. No shadows
A 2D sci-fi power-up gift box that grants a shield, designed with a glowing blue energy core inside a metallic futuristic container. The box features holographic shield symbols, neon cyan highlights, and soft pulsing light. It is slightly levitating, surrounded by sparkles and a faint energy ring. The design should clearly suggest it gives protective power. Transparent background, digital art style, ideal for sprite use in a top-down space shooter game.. In-Game asset. 2d. High contrast. No shadows
bu görseli hız için değiştir
Design a basic 2D top-down spaceship with a compact, angular body and minimal detailing. The ship should have a small central cockpit, two modest rear thrusters, and one weapon mount. Colors are simple — grays and blues — suggesting a utilitarian design. It should look like a beginner’s ship: reliable but not advanced. In-Game asset. 2d. High contrast. No shadows
Upgrade the Level 1 ship into a more capable 2D top-down design. Add wing extensions with subtle glowing lines, a larger engine section with animated thrusters, and two visible weapon hardpoints. Add more color variation (blues, steel, light glow effects) to indicate progress and increased power.. In-Game asset. 2d. High contrast. No shadows
Transform the ship into a high-tech 2D top-down spacecraft. Add shield emitters with rotating energy halos, four weapon slots, side thrusters, and an enhanced cockpit with a golden or crystal-like glow. The silhouette is wider and more refined. Visuals should include detailed paneling, moving parts, and advanced energy flows.. In-Game asset. 2d. High contrast. No shadows
elmas. In-Game asset. 2d. High contrast. No shadows
uzay 2d etkileyici lazer ışını. In-Game asset. 2d. High contrast. No shadows