User prompt
Özel etkinlik yılbaşı bonuz yazısını sadece kırmızı yanip sönsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
FPS göstergesi ana menüye köy
User prompt
**Sosyal ve Paylaşım** - **Sosyal medya bağlantıları** - Facebook, Twitter linkleri - **Arkadaş davet kodu** - Arkadaştan davet ile gelme özelliği - **Topluluk** - Discord/forum linklerine yönlendirme
User prompt
## Sosyal Kanıt ve Güven - **Kullanıcı istatistikleri** - "50.000+ kayıtlı oyuncu" - **Puanlama sistemi** - "⭐⭐⭐⭐⭐ (4.8/5) - 2.500 değerlendirme" - **Güvenlik sertifikaları** - SSL, veri koruma rozetleri
User prompt
Çerez politikası sil
User prompt
Güvenlik ve Gizlilik - **Gizlilik politikası** linki - **Kullanım şartları** linki - **Çerez politikası** bildirimi - **Güvenli bağlantı** ikonu
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'visible')' in or related to this line: 'connectionIndicator.visible = true;' Line Number: 871
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'visible')' in or related to this line: 'connectionIndicator.visible = true;' Line Number: 871
User prompt
İnternet bağlantı durumu ve premium ✅ yazısı sadece ana menüde gözüksün oyuna girdiğimde o yazıyı gösterme
User prompt
Misafir olarak giriş yapma ekranı her oyuna girdigimde göstersin
User prompt
Dönen çarkı sil
User prompt
Özel etkinlikler bildirimini sayfanın en üstüne koy ana menüde
User prompt
Spin wheel ekle onuda sağ üste yazının altına buton olarak ekle.
User prompt
Gözükmüyor
User prompt
İnternet bağlantı durumunu ana menü sağ üste koy o zaman
User prompt
Ana menü sağ üste premium aktivite d✅ yazısı ekle
User prompt
Oyuna son eklenenler butonunu çok az aşağıya kaydır
User prompt
Premium geçiş ve premium mağaza butonlarını sayfanın en altına koy
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { musicEnabled: true, difficultyLevel: "Normal", gameSpeedSetting: "Normal", colorMode: "Normal", shapeSize: "Normal", redBallsCollected: 0, blueBallsCollected: 0, yellowBallsCollected: 0, particleEffectsEnabled: true, screenEffectsEnabled: true, animationQuality: "High" }); /**** * Classes ****/ var BackgroundParticle = Container.expand(function () { var self = Container.call(this); var colors = [0xfeca57, 0xff9500, 0xff69b4, 0x4da6ff, 0xffffff]; // Yellow, Orange, Pink, Blue, White var randomColor = colors[Math.floor(Math.random() * colors.length)]; var particleGraphics = self.attachAsset('particle', { anchorX: 0.5, anchorY: 0.5 }); particleGraphics.tint = randomColor; particleGraphics.alpha = 0.3 + Math.random() * 0.4; // Random transparency self.speedX = (Math.random() - 0.5) * 0.5; self.speedY = -0.3 - Math.random() * 0.7; self.life = 0; self.maxLife = 300 + Math.random() * 200; var initialScale = 0.3 + Math.random() * 0.7; particleGraphics.scaleX = initialScale; particleGraphics.scaleY = initialScale; self.update = function () { self.x += self.speedX; self.y += self.speedY; self.life++; // Fade out as particle ages var lifeRatio = self.life / self.maxLife; particleGraphics.alpha = (1 - lifeRatio) * (0.3 + Math.random() * 0.4); // Gentle floating motion self.x += Math.sin(self.life * 0.01) * 0.1; // Remove particle when it's old or off screen if (self.life >= self.maxLife || self.y < -50 || self.x < -50 || self.x > 2100) { self.shouldRemove = true; } }; return self; }); var Basket = Container.expand(function (color) { var self = Container.call(this); self.color = color; var basketGraphics = self.attachAsset(color + 'Basket', { anchorX: 0.5, anchorY: 0.5 }); // Apply shape size setting to baskets var sizeMultiplier = shapeSize === 'Small' ? 0.7 : shapeSize === 'Large' ? 1.3 : 1.0; basketGraphics.scaleX = sizeMultiplier; basketGraphics.scaleY = sizeMultiplier; return self; }); var FallingShape = Container.expand(function (color) { var self = Container.call(this); self.color = color; self.speed = 3; self.lastY = 0; var shapeGraphics = self.attachAsset(color + 'Shape', { anchorX: 0.5, anchorY: 0.5 }); // Apply shape size setting var sizeMultiplier = shapeSize === 'Small' ? 0.7 : shapeSize === 'Large' ? 1.3 : 1.0; shapeGraphics.scaleX = sizeMultiplier; shapeGraphics.scaleY = sizeMultiplier; self.update = function () { self.lastY = self.y; self.y += self.speed; }; return self; }); var MenuButton = Container.expand(function (text, color) { var self = Container.call(this); // Create button background self.bg = LK.getAsset('shape', { width: 600, height: 120, color: color || 0x3498db, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5 }); self.addChild(self.bg); // Create button text self.text = new Text2(text, { size: 60, fill: 0xFFFFFF }); self.text.anchor.set(0.5, 0.5); self.addChild(self.text); self.isPressed = false; self.down = function (x, y, obj) { self.isPressed = true; tween(self, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100 }); }; self.up = function (x, y, obj) { if (self.isPressed) { self.isPressed = false; tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100 }); if (self.onClick) { self.onClick(); } } }; return self; }); var PowerUp = Container.expand(function (type) { var self = Container.call(this); self.type = type; // 'slowMotion' or 'doublePoints' self.speed = 2; self.lastY = 0; var powerUpGraphics = self.attachAsset(type + 'PowerUp', { anchorX: 0.5, anchorY: 0.5 }); // Add glowing effect powerUpGraphics.alpha = 0.8; var glowPhase = 0; self.update = function () { self.lastY = self.y; self.y += self.speed; // Glow animation glowPhase += 0.1; powerUpGraphics.alpha = 0.6 + Math.sin(glowPhase) * 0.3; // Gentle rotation powerUpGraphics.rotation += 0.05; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2c3e50 }); /**** * Game Code ****/ // Function to format game time from seconds to readable format function formatGameTime(seconds) { var hours = Math.floor(seconds / 3600); var minutes = Math.floor(seconds % 3600 / 60); var remainingSeconds = seconds % 60; if (hours > 0) { return hours + ' saat ' + minutes + ' dakika ' + remainingSeconds + ' saniye'; } else if (minutes > 0) { return minutes + ' dakika ' + remainingSeconds + ' saniye'; } else { return remainingSeconds + ' saniye'; } function showSpinWheel() { gameState = 'spinwheel'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Spin wheel title var wheelTitle = new Text2('🎰 ŞANS ÇARKI', { size: 90, fill: 0xe67e22 }); wheelTitle.anchor.set(0.5, 0.5); wheelTitle.x = 2048 / 2; wheelTitle.y = 400; currentMenu.addChild(wheelTitle); // Animate title with casino colors var titleColors = [0xe67e22, 0xf39c12, 0xe74c3c, 0x9b59b6]; var currentColorIndex = 0; function animateWheelTitle() { currentColorIndex = (currentColorIndex + 1) % titleColors.length; tween(wheelTitle, { tint: titleColors[currentColorIndex], scaleX: 1.1, scaleY: 1.1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(wheelTitle, { scaleX: 1, scaleY: 1 }, { duration: 400, onFinish: animateWheelTitle }); } }); } animateWheelTitle(); // Wheel description var wheelDesc = new Text2('Günde bir kez ücretsiz çevirebilirsiniz!\nHarika ödüller kazanma şansı.', { size: 50, fill: 0xFFFFFF }); wheelDesc.anchor.set(0.5, 0.5); wheelDesc.x = 2048 / 2; wheelDesc.y = 600; currentMenu.addChild(wheelDesc); // Wheel prizes section var prizesTitle = new Text2('🏆 ÖDÜLLER', { size: 60, fill: 0xf1c40f }); prizesTitle.anchor.set(0.5, 0.5); prizesTitle.x = 2048 / 2; prizesTitle.y = 800; currentMenu.addChild(prizesTitle); var prizesList = new Text2('• 🪙 50 Premium Coin\n• 🪙 100 Premium Coin\n• 🪙 200 Premium Coin\n• ⚡ Çift XP Boost (1 gün)\n• 🛡️ Ekstra Can x3\n• 🎁 Sürpriz Ödül\n• 💎 Nadir Şekil Kilidi\n• 🌟 Mega Bonus (500 Coin)', { size: 45, fill: 0xecf0f1 }); prizesList.anchor.set(0.5, 0.5); prizesList.x = 2048 / 2; prizesList.y = 1050; currentMenu.addChild(prizesList); // Check if user can spin today var lastSpinDate = storage.lastSpinDate || ''; var today = new Date().toDateString(); var canSpin = lastSpinDate !== today; // Spin button var spinButton = new MenuButton(canSpin ? '🎰 ÇARKI ÇEVİR!' : '⏰ Yarın Tekrar Dene', canSpin ? 0x27ae60 : 0x95a5a6); spinButton.x = 2048 / 2; spinButton.y = 1400; if (canSpin) { // Animate spin button when available var _pulseSpinButton = function pulseSpinButton() { tween(spinButton, { scaleX: 1.15, scaleY: 1.15 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(spinButton, { scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: _pulseSpinButton }); } }); }; _pulseSpinButton(); } spinButton.onClick = function () { LK.getSound('Click').play(); if (canSpin) { // Perform spin performSpin(); } }; currentMenu.addChild(spinButton); // Premium spin section var premiumSpinTitle = new Text2('💎 PREMİUM ÇEVİRME', { size: 60, fill: 0x9b59b6 }); premiumSpinTitle.anchor.set(0.5, 0.5); premiumSpinTitle.x = 2048 / 2; premiumSpinTitle.y = 1600; currentMenu.addChild(premiumSpinTitle); var premiumSpinDesc = new Text2('10 Premium Coin ile istediğiniz zaman çevirebilirsiniz!\nDaha yüksek ödül şansı.', { size: 45, fill: 0xbdc3c7 }); premiumSpinDesc.anchor.set(0.5, 0.5); premiumSpinDesc.x = 2048 / 2; premiumSpinDesc.y = 1720; currentMenu.addChild(premiumSpinDesc); // Premium spin button var premiumCoins = storage.premiumCoins || 0; var premiumSpinButton = new MenuButton('💎 Premium Çevirme (10 Coin)', premiumCoins >= 10 ? 0xe67e22 : 0x95a5a6); premiumSpinButton.x = 2048 / 2; premiumSpinButton.y = 1850; premiumSpinButton.onClick = function () { LK.getSound('Click').play(); if (premiumCoins >= 10) { storage.premiumCoins = premiumCoins - 10; performSpin(true); // Premium spin } }; currentMenu.addChild(premiumSpinButton); // Current coins display var coinsDisplay = new Text2('💰 Mevcut Coin: ' + premiumCoins, { size: 50, fill: 0xf1c40f }); coinsDisplay.anchor.set(0.5, 0.5); coinsDisplay.x = 2048 / 2; coinsDisplay.y = 2000; currentMenu.addChild(coinsDisplay); // Back button var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2200; backButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(backButton); } function performSpin(isPremium) { // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Spinning animation screen var spinTitle = new Text2('🎰 ÇARK DÖNÜYOR...', { size: 90, fill: 0xe67e22 }); spinTitle.anchor.set(0.5, 0.5); spinTitle.x = 2048 / 2; spinTitle.y = 800; currentMenu.addChild(spinTitle); // Animate spinning title tween(spinTitle, { rotation: Math.PI * 4 // 2 full rotations }, { duration: 2000, easing: tween.easeOut, onFinish: function onFinish() { // Show result showSpinResult(isPremium); } }); // Add excitement text var excitementText = new Text2('🌟 Hangi ödülü kazanacaksınız? 🌟', { size: 60, fill: 0xf1c40f }); excitementText.anchor.set(0.5, 0.5); excitementText.x = 2048 / 2; excitementText.y = 1200; currentMenu.addChild(excitementText); // Animate excitement text tween(excitementText, { alpha: 0.5 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { tween(excitementText, { alpha: 1 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { if (excitementText.parent) { tween(excitementText, { alpha: 0.5 }, { duration: 500, easing: tween.easeInOut }); } } }); } }); } function showSpinResult(isPremium) { // Define prizes (premium has better odds) var prizes = [{ name: '50 Premium Coin', value: 50, type: 'coin', rarity: 'common' }, { name: '100 Premium Coin', value: 100, type: 'coin', rarity: 'common' }, { name: '200 Premium Coin', value: 200, type: 'coin', rarity: 'rare' }, { name: 'Çift XP Boost (1 gün)', value: 1, type: 'boost', rarity: 'rare' }, { name: 'Ekstra Can x3', value: 3, type: 'lives', rarity: 'common' }, { name: 'Sürpriz Ödül', value: 0, type: 'surprise', rarity: 'epic' }, { name: 'Nadir Şekil Kilidi', value: 1, type: 'unlock', rarity: 'epic' }, { name: 'Mega Bonus (500 Coin)', value: 500, type: 'coin', rarity: 'legendary' }]; // Select random prize (premium has better chances for rare items) var randomValue = Math.random(); var selectedPrize; if (isPremium) { // Premium spin has better odds if (randomValue < 0.05) { selectedPrize = prizes[7]; // Legendary } else if (randomValue < 0.20) { selectedPrize = prizes[5 + Math.floor(Math.random() * 2)]; // Epic } else if (randomValue < 0.50) { selectedPrize = prizes[2 + Math.floor(Math.random() * 2)]; // Rare } else { selectedPrize = prizes[Math.floor(Math.random() * 2)]; // Common } } else { // Normal spin if (randomValue < 0.01) { selectedPrize = prizes[7]; // Legendary } else if (randomValue < 0.10) { selectedPrize = prizes[5 + Math.floor(Math.random() * 2)]; // Epic } else if (randomValue < 0.30) { selectedPrize = prizes[2 + Math.floor(Math.random() * 2)]; // Rare } else { selectedPrize = prizes[Math.floor(Math.random() * 5)]; // Common } } // Update last spin date for free spins if (!isPremium) { storage.lastSpinDate = new Date().toDateString(); } // Apply prize switch (selectedPrize.type) { case 'coin': storage.premiumCoins = (storage.premiumCoins || 0) + selectedPrize.value; break; case 'boost': storage.doubleXPBoost = true; storage.boostExpiry = Date.now() + 24 * 60 * 60 * 1000; // 24 hours break; case 'lives': storage.extraLives = (storage.extraLives || 0) + selectedPrize.value; break; case 'unlock': storage.rareShapesUnlocked = true; break; case 'surprise': // Random bonus storage.premiumCoins = (storage.premiumCoins || 0) + (150 + Math.floor(Math.random() * 100)); break; } // Clear menu and show result if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Result title var resultTitle = new Text2('🎉 TEBRİKLER! 🎉', { size: 100, fill: 0x27ae60 }); resultTitle.anchor.set(0.5, 0.5); resultTitle.x = 2048 / 2; resultTitle.y = 600; currentMenu.addChild(resultTitle); // Prize announcement var prizeText = new Text2('Kazandığınız ödül:', { size: 60, fill: 0xf1c40f }); prizeText.anchor.set(0.5, 0.5); prizeText.x = 2048 / 2; prizeText.y = 800; currentMenu.addChild(prizeText); // Prize name with rarity color var rarityColors = { common: 0xFFFFFF, rare: 0x3498db, epic: 0x9b59b6, legendary: 0xf1c40f }; var prizeNameText = new Text2(selectedPrize.name, { size: 80, fill: rarityColors[selectedPrize.rarity] }); prizeNameText.anchor.set(0.5, 0.5); prizeNameText.x = 2048 / 2; prizeNameText.y = 1000; currentMenu.addChild(prizeNameText); // Animate prize text tween(prizeNameText, { scaleX: 1.2, scaleY: 1.2 }, { duration: 500, easing: tween.bounceOut, onFinish: function onFinish() { tween(prizeNameText, { scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.easeOut }); } }); // Show current coins var newCoins = storage.premiumCoins || 0; var coinsText = new Text2('💰 Toplam Coin: ' + newCoins, { size: 50, fill: 0xf39c12 }); coinsText.anchor.set(0.5, 0.5); coinsText.x = 2048 / 2; coinsText.y = 1200; currentMenu.addChild(coinsText); // Continue button var continueButton = new MenuButton('✨ DEVAM ET', 0x27ae60); continueButton.x = 2048 / 2; continueButton.y = 1500; continueButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(continueButton); // Spin again button (if premium) if (isPremium || storage.premiumCoins >= 10) { var spinAgainButton = new MenuButton('🎰 Tekrar Çevir', 0xe67e22); spinAgainButton.x = 2048 / 2; spinAgainButton.y = 1650; spinAgainButton.onClick = function () { LK.getSound('Click').play(); showSpinWheel(); }; currentMenu.addChild(spinAgainButton); } // Flash screen with rarity color LK.effects.flashScreen(rarityColors[selectedPrize.rarity], 1000); // Play celebration sound LK.getSound('Applause').play(); } ; } var baskets = []; var fallingShapes = []; var powerUps = []; var slowMotionActive = false; var doublePointsActive = false; var slowMotionTimer = 0; var doublePointsTimer = 0; var powerUpSpawnTimer = 0; // Update colors based on color mode var colors = colorMode === 'ColorBlind' ? ['red', 'blue', 'yellow'] : ['red', 'blue', 'yellow']; // Note: In real implementation, colorblind mode would use different color combinations var gameSpeed = 1; var consecutiveMatches = 0; var draggedBasket = null; var gameState = 'menu'; // 'menu', 'playing', 'howtoplay', 'settings' var menuButtons = []; var currentMenu = null; var musicEnabled = storage.musicEnabled !== undefined ? storage.musicEnabled : true; // Track music state var highScore = storage.highScore || 0; // Load saved high score // Game time tracking var totalGameTime = storage.totalGameTime || 0; // Total time played in seconds var currentSessionStartTime = 0; // When current game session started var gameTimeTimer = null; // Timer for tracking game time var sessionStartTime = 0; // Track when current session actually started // Ball collection requirements and tracking var ballRequirements = { red: 5, blue: 5, yellow: 5 }; var ballsCollected = { red: storage.redBallsCollected || 0, blue: storage.blueBallsCollected || 0, yellow: storage.yellowBallsCollected || 0 }; // Level system var currentLevel = 1; var levelCompleted = false; storage.currentLevel = 1; // Game settings from storage var difficultyLevel = storage.difficultyLevel || 'Normal'; // Easy, Normal, Hard var gameSpeedSetting = storage.gameSpeedSetting || 'Normal'; // Slow, Normal, Fast var colorMode = storage.colorMode || 'Normal'; // Normal, ColorBlind var shapeSize = storage.shapeSize || 'Normal'; // Small, Normal, Large // Create animated background var backgroundContainer = new Container(); game.addChild(backgroundContainer); // Create menu background var menuBg = LK.getAsset('menuBackground', { anchorX: 0, anchorY: 0 }); menuBg.x = 0; menuBg.y = 0; menuBg.alpha = 0.9; backgroundContainer.addChild(menuBg); // Create gradient layers var gradientLayer1 = LK.getAsset('gradientLayer1', { anchorX: 0, anchorY: 0 }); gradientLayer1.x = 0; gradientLayer1.y = 0; gradientLayer1.alpha = 0.3; backgroundContainer.addChild(gradientLayer1); var gradientLayer2 = LK.getAsset('gradientLayer2', { anchorX: 0, anchorY: 0 }); gradientLayer2.x = 0; gradientLayer2.y = 0; gradientLayer2.alpha = 0.2; backgroundContainer.addChild(gradientLayer2); // Animate gradient layers function animateGradientLayers() { // Animate menu background tween(menuBg, { alpha: 0.7 }, { duration: 4000, easing: tween.easeInOut, onFinish: function onFinish() { tween(menuBg, { alpha: 0.9 }, { duration: 4000, easing: tween.easeInOut }); } }); tween(gradientLayer1, { alpha: 0.1 }, { duration: 3000, easing: tween.easeInOut, onFinish: function onFinish() { tween(gradientLayer1, { alpha: 0.3 }, { duration: 3000, easing: tween.easeInOut, onFinish: animateGradientLayers }); } }); tween(gradientLayer2, { alpha: 0.1 }, { duration: 2500, easing: tween.easeInOut, onFinish: function onFinish() { tween(gradientLayer2, { alpha: 0.2 }, { duration: 2500, easing: tween.easeInOut }); } }); } animateGradientLayers(); // Particle system var backgroundParticles = []; var particleSpawnTimer = 0; // Create score display (initially hidden) var scoreTxt = new Text2('0', { size: 100, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); scoreTxt.visible = false; LK.gui.top.addChild(scoreTxt); // Create ball collection display (initially hidden) var ballCountTxt = new Text2('', { size: 50, fill: 0xFFFFFF }); ballCountTxt.anchor.set(1, 0); ballCountTxt.visible = false; LK.gui.topRight.addChild(ballCountTxt); // Create pause button (initially hidden) var pauseButton = new MenuButton('⏸️ DURAKLAT', 0x34495e); pauseButton.x = 150; pauseButton.y = 80; pauseButton.visible = false; pauseButton.onClick = function () { LK.getSound('Click').play(); togglePause(); }; LK.gui.topLeft.addChild(pauseButton); // Game pause state var gamePaused = false; var pauseMenu = null; // Function to update ball collection display function updateBallDisplay() { // Clear existing text and recreate with colored sections if (ballCountTxt.parent) { ballCountTxt.parent.removeChild(ballCountTxt); } // Create container for colored text elements var ballDisplayContainer = new Container(); ballDisplayContainer.x = ballCountTxt.x; ballDisplayContainer.y = ballCountTxt.y; LK.gui.topRight.addChild(ballDisplayContainer); // Title text with enhanced styling var titleText = new Text2('🎯 BÖLÜM ' + currentLevel + ' HEDEFLERİ', { size: 55, fill: 0xf1c40f }); titleText.anchor.set(1, 0); titleText.x = 0; titleText.y = 0; ballDisplayContainer.addChild(titleText); // Add animated glow effect to title tween(titleText, { alpha: 0.7 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(titleText, { alpha: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { // Continue glow animation if still in game if (gameState === 'playing') { tween(titleText, { alpha: 0.7 }, { duration: 1000, easing: tween.easeInOut }); } } }); } }); // Red ball text with red color var redText = new Text2('Kırmızı: ' + ballsCollected.red + '/' + ballRequirements.red, { size: 50, fill: 0xff0000 }); redText.anchor.set(1, 0); redText.x = 0; redText.y = 60; ballDisplayContainer.addChild(redText); // Blue ball text with blue color var blueText = new Text2('Mavi: ' + ballsCollected.blue + '/' + ballRequirements.blue, { size: 50, fill: 0x0066ff }); blueText.anchor.set(1, 0); blueText.x = 0; blueText.y = 120; ballDisplayContainer.addChild(blueText); // Yellow ball text with yellow color var yellowText = new Text2('Sarı: ' + ballsCollected.yellow + '/' + ballRequirements.yellow, { size: 50, fill: 0xffff00 }); yellowText.anchor.set(1, 0); yellowText.x = 0; yellowText.y = 180; ballDisplayContainer.addChild(yellowText); // Add power-up status display if (slowMotionActive || doublePointsActive) { var powerUpStatus = new Text2('', { size: 40, fill: 0xffffff }); powerUpStatus.anchor.set(1, 0); powerUpStatus.x = 0; powerUpStatus.y = 250; var statusText = ''; if (slowMotionActive) { statusText += '🕐 Yavaş Hareket: ' + Math.ceil(slowMotionTimer / 60) + 's\n'; } if (doublePointsActive) { statusText += '⭐ Çift Puan: ' + Math.ceil(doublePointsTimer / 60) + 's\n'; } powerUpStatus.setText(statusText); ballDisplayContainer.addChild(powerUpStatus); } // Update the global reference to the new container ballCountTxt = ballDisplayContainer; } // Internet connection status indicator in top right var connectionIndicator = new Text2('🌐 Bağlı', { size: 40, fill: 0x27ae60 }); connectionIndicator.anchor.set(1, 0); // Anchor to top right connectionIndicator.x = -20; // Position relative to topRight anchor connectionIndicator.y = 20; // Position from top LK.gui.topRight.addChild(connectionIndicator); // Premium activity indicator in top right (moved down) var premiumIndicator = new Text2('Premium ✅', { size: 40, fill: 0x27ae60 }); premiumIndicator.anchor.set(1, 0); // Anchor to top right premiumIndicator.x = -20; // Position relative to topRight anchor premiumIndicator.y = 70; // Position below connection indicator LK.gui.topRight.addChild(premiumIndicator); // Initialize menu system function createMainMenu() { gameState = 'menu'; gamePaused = false; // Hide game UI elements scoreTxt.visible = false; ballCountTxt.visible = false; pauseButton.visible = false; // Show connection and premium indicators in main menu connectionIndicator.visible = true; premiumIndicator.visible = true; // Clean up pause menu if it exists if (pauseMenu) { pauseMenu.destroy(); pauseMenu = null; } // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Play main menu background music if (musicEnabled) { LK.playMusic('Mainmenubackground'); } // Game title var titleText = new Text2('TOPLARI YAKALA', { size: 120, fill: 0xffff00 }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 600; currentMenu.addChild(titleText); // Enhanced title animations with multiple effects var titleColors = [0xfeca57, 0xff9500, 0xff69b4, 0x4da6ff, 0x27ae60, 0xe74c3c]; // Yellow, Orange, Pink, Blue, Green, Red var currentColorIndex = 0; function animateTitle() { // Color cycling animation with faster transitions currentColorIndex = (currentColorIndex + 1) % titleColors.length; tween(titleText, { tint: titleColors[currentColorIndex] }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { animateTitle(); } }); } // Fast yellow blinking animation function yellowBlinkTitle() { tween(titleText, { tint: 0xffff00 }, { duration: 200, easing: tween.linear, onFinish: function onFinish() { tween(titleText, { tint: 0xfeca57 }, { duration: 200, easing: tween.linear, onFinish: yellowBlinkTitle }); } }); } // Pulse effect - continuous scale animation function pulseTitle() { tween(titleText, { scaleX: 1.15, scaleY: 1.15 }, { duration: 1200, easing: tween.easeInOut, onFinish: function onFinish() { tween(titleText, { scaleX: 1, scaleY: 1 }, { duration: 1200, easing: tween.easeInOut, onFinish: pulseTitle }); } }); } // Gentle floating movement with enhanced motion function floatTitle() { var randomY = 600 + (Math.random() - 0.5) * 40; tween(titleText, { y: randomY }, { duration: 3000, easing: tween.easeInOut, onFinish: floatTitle }); } // Rotation effect function rotateTitle() { tween(titleText, { rotation: Math.PI * 0.05 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(titleText, { rotation: -Math.PI * 0.05 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(titleText, { rotation: 0 }, { duration: 1000, easing: tween.easeInOut, onFinish: rotateTitle }); } }); } }); } // Glow effect simulation with alpha changes function glowTitle() { tween(titleText, { alpha: 0.7 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(titleText, { alpha: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: glowTitle }); } }); } // Start all animations animateTitle(); yellowBlinkTitle(); pulseTitle(); floatTitle(); rotateTitle(); glowTitle(); // Menu buttons - Main game controls group var startButton = new MenuButton('OYUNU BAŞLAT', 0x27ae60); startButton.x = 2048 / 2; startButton.y = 1000; // Enhanced start button animations // Gradient color animation with multiple colors var startButtonColors = [0x27ae60, 0x2ecc71, 0x1abc9c, 0x16a085, 0x27ae60]; var currentStartColorIndex = 0; function animateStartButton() { currentStartColorIndex = (currentStartColorIndex + 1) % startButtonColors.length; tween(startButton.bg, { tint: startButtonColors[currentStartColorIndex] }, { duration: 800, easing: tween.easeInOut, onFinish: animateStartButton }); } // Pulsing scale animation function pulseStartButton() { tween(startButton, { scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(startButton, { scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: pulseStartButton }); } }); } // Glow effect with alpha changes function glowStartButton() { tween(startButton, { alpha: 0.7 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { tween(startButton, { alpha: 1 }, { duration: 600, easing: tween.easeInOut, onFinish: glowStartButton }); } }); } // Gentle floating movement function floatStartButton() { var randomY = 1000 + (Math.random() - 0.5) * 20; tween(startButton, { y: randomY }, { duration: 2000, easing: tween.easeInOut, onFinish: floatStartButton }); } // Start all animations animateStartButton(); pulseStartButton(); glowStartButton(); floatStartButton(); startButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation tween(startButton, { scaleX: 1.2, scaleY: 1.2, rotation: Math.PI * 0.05 }, { duration: 150, easing: tween.bounceOut, onFinish: function onFinish() { tween(startButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { startGame(); } }); } }); }; currentMenu.addChild(startButton); // Information and help group var howToPlayButton = new MenuButton('❓ NASIL OYNANIR?', 0x3498db); howToPlayButton.x = 2048 / 2; howToPlayButton.y = 1150; // Enhanced how to play button animations // Question mark pulse animation - makes the button more noticeable function pulseHowToPlayButton() { tween(howToPlayButton, { scaleX: 1.08, scaleY: 1.08 }, { duration: 1200, easing: tween.easeInOut, onFinish: function onFinish() { tween(howToPlayButton, { scaleX: 1, scaleY: 1 }, { duration: 1200, easing: tween.easeInOut, onFinish: pulseHowToPlayButton }); } }); } // Color cycling animation with educational colors var howToPlayColors = [0x3498db, 0x9b59b6, 0x1abc9c, 0xf39c12]; // Blue, Purple, Teal, Orange var currentHowToPlayColorIndex = 0; function animateHowToPlayButton() { currentHowToPlayColorIndex = (currentHowToPlayColorIndex + 1) % howToPlayColors.length; tween(howToPlayButton.bg, { tint: howToPlayColors[currentHowToPlayColorIndex] }, { duration: 1500, easing: tween.easeInOut, onFinish: animateHowToPlayButton }); } // Gentle shake animation to draw attention function shakeHowToPlayButton() { tween(howToPlayButton, { x: 2048 / 2 + 8 }, { duration: 150, easing: tween.easeInOut, onFinish: function onFinish() { tween(howToPlayButton, { x: 2048 / 2 - 8 }, { duration: 150, easing: tween.easeInOut, onFinish: function onFinish() { tween(howToPlayButton, { x: 2048 / 2 }, { duration: 150, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat shake after delay LK.setTimeout(shakeHowToPlayButton, 5000); } }); } }); } }); } // Glow effect for help button function glowHowToPlayButton() { tween(howToPlayButton, { alpha: 0.6 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(howToPlayButton, { alpha: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: glowHowToPlayButton }); } }); } // Start all animations pulseHowToPlayButton(); animateHowToPlayButton(); glowHowToPlayButton(); // Start shake animation after a delay LK.setTimeout(shakeHowToPlayButton, 3000); howToPlayButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with question mark theme tween(howToPlayButton, { scaleX: 1.3, scaleY: 1.3, rotation: Math.PI * 0.1 }, { duration: 200, easing: tween.bounceOut, onFinish: function onFinish() { tween(howToPlayButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { showHowToPlay(); } }); } }); }; currentMenu.addChild(howToPlayButton); var statisticsButton = new MenuButton('📊 İSTATİSTİKLERİM', 0x6c5ce7); statisticsButton.x = 2048 / 2; statisticsButton.y = 1300; // Enhanced statistics button animations // Data visualization effect with color cycling var statisticsColors = [0x6c5ce7, 0x9b59b6, 0x3498db, 0x1abc9c]; // Purple, Violet, Blue, Teal var currentStatsColorIndex = 0; function animateStatisticsButton() { currentStatsColorIndex = (currentStatsColorIndex + 1) % statisticsColors.length; tween(statisticsButton.bg, { tint: statisticsColors[currentStatsColorIndex] }, { duration: 1800, easing: tween.easeInOut, onFinish: animateStatisticsButton }); } // Chart-like pulse animation function pulseStatisticsButton() { tween(statisticsButton, { scaleX: 1.06, scaleY: 1.06 }, { duration: 1400, easing: tween.easeInOut, onFinish: function onFinish() { tween(statisticsButton, { scaleX: 1, scaleY: 1 }, { duration: 1400, easing: tween.easeInOut, onFinish: pulseStatisticsButton }); } }); } // Data bar effect simulation with gentle shake function shakeStatisticsButton() { tween(statisticsButton, { x: 2048 / 2 + 6 }, { duration: 100, easing: tween.easeInOut, onFinish: function onFinish() { tween(statisticsButton, { x: 2048 / 2 - 6 }, { duration: 100, easing: tween.easeInOut, onFinish: function onFinish() { tween(statisticsButton, { x: 2048 / 2 }, { duration: 100, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat shake after delay LK.setTimeout(shakeStatisticsButton, 4000); } }); } }); } }); } // Glow effect for data visualization theme function glowStatisticsButton() { tween(statisticsButton, { alpha: 0.75 }, { duration: 700, easing: tween.easeInOut, onFinish: function onFinish() { tween(statisticsButton, { alpha: 1 }, { duration: 700, easing: tween.easeInOut, onFinish: glowStatisticsButton }); } }); } // Start all animations animateStatisticsButton(); pulseStatisticsButton(); glowStatisticsButton(); // Start shake animation after a delay LK.setTimeout(shakeStatisticsButton, 2000); statisticsButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with chart theme tween(statisticsButton, { scaleX: 1.25, scaleY: 1.25, rotation: Math.PI * 0.08 }, { duration: 180, easing: tween.bounceOut, onFinish: function onFinish() { tween(statisticsButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 120, easing: tween.easeOut, onFinish: function onFinish() { showStatistics(); } }); } }); }; currentMenu.addChild(statisticsButton); // Game settings group var settingsButton = new MenuButton('⚙️ AYARLAR', 0xf39c12); settingsButton.x = 2048 / 2; settingsButton.y = 1450; // Enhanced settings button animations // Gear rotation effect function rotateSettingsButton() { tween(settingsButton, { rotation: Math.PI * 0.05 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(settingsButton, { rotation: -Math.PI * 0.05 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(settingsButton, { rotation: 0 }, { duration: 1500, easing: tween.easeInOut, onFinish: rotateSettingsButton }); } }); } }); } // Mechanical color cycling var settingsColors = [0xf39c12, 0xe67e22, 0xd35400, 0x95a5a6]; // Orange, Dark Orange, Darker Orange, Gray var currentSettingsColorIndex = 0; function animateSettingsButton() { currentSettingsColorIndex = (currentSettingsColorIndex + 1) % settingsColors.length; tween(settingsButton.bg, { tint: settingsColors[currentSettingsColorIndex] }, { duration: 1600, easing: tween.easeInOut, onFinish: animateSettingsButton }); } // Mechanical pulse animation function pulseSettingsButton() { tween(settingsButton, { scaleX: 1.08, scaleY: 1.08 }, { duration: 1300, easing: tween.easeInOut, onFinish: function onFinish() { tween(settingsButton, { scaleX: 1, scaleY: 1 }, { duration: 1300, easing: tween.easeInOut, onFinish: pulseSettingsButton }); } }); } // Gear-like glow effect function glowSettingsButton() { tween(settingsButton, { alpha: 0.7 }, { duration: 900, easing: tween.easeInOut, onFinish: function onFinish() { tween(settingsButton, { alpha: 1 }, { duration: 900, easing: tween.easeInOut, onFinish: glowSettingsButton }); } }); } // Start all animations rotateSettingsButton(); animateSettingsButton(); pulseSettingsButton(); glowSettingsButton(); settingsButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with gear theme tween(settingsButton, { scaleX: 1.3, scaleY: 1.3, rotation: Math.PI * 0.5 }, { duration: 200, easing: tween.bounceOut, onFinish: function onFinish() { tween(settingsButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { showSettings(); } }); } }); }; currentMenu.addChild(settingsButton); // Development and creator group var creatorsButton = new MenuButton('🎬 YAPIMCILAR', 0x9b59b6); creatorsButton.x = 2048 / 2; creatorsButton.y = 1600; // Enhanced creators button animations // Film reel color cycling var creatorsColors = [0x9b59b6, 0x8e44ad, 0x3498db, 0xe74c3c]; // Purple, Dark Purple, Blue, Red var currentCreatorsColorIndex = 0; function animateCreatorsButton() { currentCreatorsColorIndex = (currentCreatorsColorIndex + 1) % creatorsColors.length; tween(creatorsButton.bg, { tint: creatorsColors[currentCreatorsColorIndex] }, { duration: 2000, easing: tween.easeInOut, onFinish: animateCreatorsButton }); } // Movie credits roll effect function rollCreatorsButton() { tween(creatorsButton, { y: 1650 - 15 }, { duration: 1800, easing: tween.easeInOut, onFinish: function onFinish() { tween(creatorsButton, { y: 1650 + 15 }, { duration: 1800, easing: tween.easeInOut, onFinish: function onFinish() { tween(creatorsButton, { y: 1650 }, { duration: 1200, easing: tween.easeInOut, onFinish: rollCreatorsButton }); } }); } }); } // Film camera pulse effect function pulseCreatorsButton() { tween(creatorsButton, { scaleX: 1.07, scaleY: 1.07 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(creatorsButton, { scaleX: 1, scaleY: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: pulseCreatorsButton }); } }); } // Spotlight glow effect function glowCreatorsButton() { tween(creatorsButton, { alpha: 0.6 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(creatorsButton, { alpha: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: glowCreatorsButton }); } }); } // Start all animations animateCreatorsButton(); rollCreatorsButton(); pulseCreatorsButton(); glowCreatorsButton(); creatorsButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with film theme tween(creatorsButton, { scaleX: 1.4, scaleY: 1.4, rotation: Math.PI * 0.15 }, { duration: 250, easing: tween.bounceOut, onFinish: function onFinish() { tween(creatorsButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { showCreators(); } }); } }); }; currentMenu.addChild(creatorsButton); var recentUpdatesButton = new MenuButton('🆕 OYUNA SON EKLENENLER', 0x1abc9c); recentUpdatesButton.x = 2048 / 2; recentUpdatesButton.y = 1780; // Enhanced recent updates button animations // Notification badge flash effect var updatesColors = [0x1abc9c, 0x16a085, 0xe74c3c, 0xf1c40f]; // Teal, Dark Teal, Red, Yellow var currentUpdatesColorIndex = 0; function animateUpdatesButton() { currentUpdatesColorIndex = (currentUpdatesColorIndex + 1) % updatesColors.length; tween(recentUpdatesButton.bg, { tint: updatesColors[currentUpdatesColorIndex] }, { duration: 1200, easing: tween.easeInOut, onFinish: animateUpdatesButton }); } // New content notification pulse function pulseUpdatesButton() { tween(recentUpdatesButton, { scaleX: 1.12, scaleY: 1.12 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(recentUpdatesButton, { scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: pulseUpdatesButton }); } }); } // Notification glow effect with stronger intensity function glowUpdatesButton() { tween(recentUpdatesButton, { alpha: 0.5 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { tween(recentUpdatesButton, { alpha: 1 }, { duration: 600, easing: tween.easeInOut, onFinish: glowUpdatesButton }); } }); } // New badge shake animation function shakeUpdatesButton() { tween(recentUpdatesButton, { x: 2048 / 2 + 10 }, { duration: 120, easing: tween.easeInOut, onFinish: function onFinish() { tween(recentUpdatesButton, { x: 2048 / 2 - 10 }, { duration: 120, easing: tween.easeInOut, onFinish: function onFinish() { tween(recentUpdatesButton, { x: 2048 / 2 }, { duration: 120, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat shake after delay LK.setTimeout(shakeUpdatesButton, 6000); } }); } }); } }); } // Start all animations animateUpdatesButton(); pulseUpdatesButton(); glowUpdatesButton(); // Start shake animation after a delay LK.setTimeout(shakeUpdatesButton, 3500); recentUpdatesButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with notification theme tween(recentUpdatesButton, { scaleX: 1.35, scaleY: 1.35, rotation: Math.PI * 0.12 }, { duration: 220, easing: tween.bounceOut, onFinish: function onFinish() { tween(recentUpdatesButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 180, easing: tween.easeOut, onFinish: function onFinish() { showRecentUpdates(); } }); } }); }; currentMenu.addChild(recentUpdatesButton); // Premium section - moved to bottom var premiumButton = new MenuButton('💎 PREMİUM GEÇİŞ', 0xf1c40f); premiumButton.x = 2048 / 2; // Center horizontally premiumButton.y = 2350; // Position at bottom of page // Enhanced premium button animations // Gold color cycling var premiumColors = [0xf1c40f, 0xf39c12, 0xe67e22, 0xd35400]; // Gold, Orange, Dark Orange, Darker Orange var currentPremiumColorIndex = 0; function animatePremiumButton() { currentPremiumColorIndex = (currentPremiumColorIndex + 1) % premiumColors.length; tween(premiumButton.bg, { tint: premiumColors[currentPremiumColorIndex] }, { duration: 1000, easing: tween.easeInOut, onFinish: animatePremiumButton }); } // Luxury pulse animation function pulsePremiumButton() { tween(premiumButton, { scaleX: 1.15, scaleY: 1.15 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumButton, { scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: pulsePremiumButton }); } }); } // Premium glow effect with stronger intensity function glowPremiumButton() { tween(premiumButton, { alpha: 0.6 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumButton, { alpha: 1 }, { duration: 600, easing: tween.easeInOut, onFinish: glowPremiumButton }); } }); } // Floating luxury effect function floatPremiumButton() { var randomY = 2350 + (Math.random() - 0.5) * 15; tween(premiumButton, { y: randomY }, { duration: 2000, easing: tween.easeInOut, onFinish: floatPremiumButton }); } // Start all animations animatePremiumButton(); pulsePremiumButton(); glowPremiumButton(); floatPremiumButton(); premiumButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with luxury theme tween(premiumButton, { scaleX: 1.4, scaleY: 1.4, rotation: Math.PI * 0.1 }, { duration: 200, easing: tween.bounceOut, onFinish: function onFinish() { tween(premiumButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { showPremium(); } }); } }); }; currentMenu.addChild(premiumButton); var premiumStoreButton = new MenuButton('🛍️ PREMİUM MAĞAZA', 0xd63384); premiumStoreButton.x = 2048 / 2; premiumStoreButton.y = 2500; // Position at bottom of page // Enhanced premium store button animations // Shopping color cycling var storeColors = [0xd63384, 0xb83d6e, 0x9c2755, 0x7f1d42]; // Pink, Dark Pink, Purple Pink, Dark Purple Pink var currentStoreColorIndex = 0; function animateStoreButton() { currentStoreColorIndex = (currentStoreColorIndex + 1) % storeColors.length; tween(premiumStoreButton.bg, { tint: storeColors[currentStoreColorIndex] }, { duration: 900, easing: tween.easeInOut, onFinish: animateStoreButton }); } // Shopping cart pulse animation function pulseStoreButton() { tween(premiumStoreButton, { scaleX: 1.12, scaleY: 1.12 }, { duration: 850, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumStoreButton, { scaleX: 1, scaleY: 1 }, { duration: 850, easing: tween.easeInOut, onFinish: pulseStoreButton }); } }); } // Store glow effect function glowStoreButton() { tween(premiumStoreButton, { alpha: 0.65 }, { duration: 650, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumStoreButton, { alpha: 1 }, { duration: 650, easing: tween.easeInOut, onFinish: glowStoreButton }); } }); } // Shopping bag sway effect function swayStoreButton() { var randomX = 2048 / 2 + (Math.random() - 0.5) * 20; tween(premiumStoreButton, { x: randomX }, { duration: 1800, easing: tween.easeInOut, onFinish: swayStoreButton }); } // Start all animations animateStoreButton(); pulseStoreButton(); glowStoreButton(); swayStoreButton(); premiumStoreButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with shopping theme tween(premiumStoreButton, { scaleX: 1.35, scaleY: 1.35, rotation: Math.PI * 0.08 }, { duration: 180, easing: tween.bounceOut, onFinish: function onFinish() { tween(premiumStoreButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 130, easing: tween.easeOut, onFinish: function onFinish() { showPremiumStore(); } }); } }); }; currentMenu.addChild(premiumStoreButton); // Exit section var exitButton = new MenuButton('🚪 ÇIKIŞ', 0xe74c3c); exitButton.x = 2048 / 2; exitButton.y = 1950; // Enhanced exit button animations // Warning color cycling var exitColors = [0xe74c3c, 0xc0392b, 0x95a5a6, 0x34495e]; // Red, Dark Red, Gray, Dark Gray var currentExitColorIndex = 0; function animateExitButton() { currentExitColorIndex = (currentExitColorIndex + 1) % exitColors.length; tween(exitButton.bg, { tint: exitColors[currentExitColorIndex] }, { duration: 2200, easing: tween.easeInOut, onFinish: animateExitButton }); } // Warning pulse with stronger effect function pulseExitButton() { tween(exitButton, { scaleX: 1.05, scaleY: 1.05 }, { duration: 1600, easing: tween.easeInOut, onFinish: function onFinish() { tween(exitButton, { scaleX: 1, scaleY: 1 }, { duration: 1600, easing: tween.easeInOut, onFinish: pulseExitButton }); } }); } // Danger glow effect function glowExitButton() { tween(exitButton, { alpha: 0.8 }, { duration: 1100, easing: tween.easeInOut, onFinish: function onFinish() { tween(exitButton, { alpha: 1 }, { duration: 1100, easing: tween.easeInOut, onFinish: glowExitButton }); } }); } // Warning door close effect function doorExitButton() { tween(exitButton, { y: 2050 - 8 }, { duration: 2500, easing: tween.easeInOut, onFinish: function onFinish() { tween(exitButton, { y: 2050 + 8 }, { duration: 2500, easing: tween.easeInOut, onFinish: function onFinish() { tween(exitButton, { y: 2050 }, { duration: 2000, easing: tween.easeInOut, onFinish: doorExitButton }); } }); } }); } // Start all animations animateExitButton(); pulseExitButton(); glowExitButton(); doorExitButton(); exitButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation with door/warning theme tween(exitButton, { scaleX: 1.2, scaleY: 1.2, rotation: Math.PI * 0.06 }, { duration: 160, easing: tween.bounceOut, onFinish: function onFinish() { tween(exitButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 140, easing: tween.easeOut, onFinish: function onFinish() { // On mobile, we can't actually exit, so show a message LK.effects.flashScreen(0x000000, 1000); } }); } }); }; currentMenu.addChild(exitButton); // Add glow animation to connection indicator tween(connectionIndicator, { alpha: 0.7 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(connectionIndicator, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if still in main menu if (gameState === 'menu') { tween(connectionIndicator, { alpha: 0.7 }, { duration: 2000, easing: tween.easeInOut }); } } }); } }); // Add glow animation to premium indicator tween(premiumIndicator, { alpha: 0.7 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumIndicator, { alpha: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if still in main menu if (gameState === 'menu') { tween(premiumIndicator, { alpha: 0.7 }, { duration: 1500, easing: tween.easeInOut }); } } }); } }); // FPS indicator in top right var fpsIndicator = new Text2('FPS: 60', { size: 35, fill: 0xFFFFFF }); fpsIndicator.anchor.set(1, 0); // Anchor to top right fpsIndicator.x = -20; // Position relative to topRight anchor fpsIndicator.y = 120; // Position below premium indicator LK.gui.topRight.addChild(fpsIndicator); // Update FPS counter var frameCount = 0; var lastTime = Date.now(); function updateFPS() { frameCount++; var currentTime = Date.now(); if (currentTime - lastTime >= 1000) { // Update every second var fps = Math.round(frameCount * 1000 / (currentTime - lastTime)); fpsIndicator.setText('FPS: ' + fps); frameCount = 0; lastTime = currentTime; } // Only update FPS when in main menu if (gameState === 'menu') { LK.setTimeout(updateFPS, 16); // ~60 FPS update rate } } updateFPS(); // Add glow animation to FPS indicator tween(fpsIndicator, { alpha: 0.8 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(fpsIndicator, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if still in main menu if (gameState === 'menu') { tween(fpsIndicator, { alpha: 0.8 }, { duration: 2000, easing: tween.easeInOut }); } } }); } }); // Special events notification at top of page var specialEventsNotification = new Text2('🎉 ÖZEL ETKİNLİK: Yılbaşı Bonusu Aktif! 🎉', { size: 50, fill: 0xff6b6b }); specialEventsNotification.anchor.set(0.5, 0.5); specialEventsNotification.x = 2048 / 2; specialEventsNotification.y = 100; // Position at very top of main menu currentMenu.addChild(specialEventsNotification); // Red blinking effect for New Year bonus function blinkSpecialEvents() { tween(specialEventsNotification, { tint: 0xff0000, alpha: 0.3 }, { duration: 400, easing: tween.easeInOut, onFinish: function onFinish() { tween(specialEventsNotification, { tint: 0xff6b6b, alpha: 1 }, { duration: 400, easing: tween.easeInOut, onFinish: blinkSpecialEvents }); } }); } // Start red blinking animation blinkSpecialEvents(); // Copyright text var copyrightText = new Text2('© 2024 FRVR - Tüm hakları saklıdır', { size: 35, fill: 0x95a5a6 }); copyrightText.anchor.set(0.5, 0.5); copyrightText.x = 2048 / 2; copyrightText.y = 2650; // Position after premium buttons with proper spacing currentMenu.addChild(copyrightText); // Add subtle fade animation to copyright tween(copyrightText, { alpha: 0.6 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(copyrightText, { alpha: 1 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat fade animation if still in main menu if (gameState === 'menu') { tween(copyrightText, { alpha: 0.6 }, { duration: 2000, easing: tween.easeInOut }); } } }); } }); } function togglePause() { if (gameState !== 'playing') return; gamePaused = !gamePaused; pauseButton.text.setText(gamePaused ? '▶️ DEVAM' : '⏸️ DURAKLAT'); pauseButton.bg.tint = gamePaused ? 0x27ae60 : 0x34495e; if (gamePaused) { // Show pause menu pauseMenu = new Container(); game.addChild(pauseMenu); // Semi-transparent overlay var overlay = LK.getAsset('shape', { width: 2048, height: 2732, color: 0x000000, shape: 'box', anchorX: 0, anchorY: 0 }); overlay.alpha = 0.7; pauseMenu.addChild(overlay); // Pause title var pauseTitle = new Text2('OYUN DURAKLATILDI', { size: 80, fill: 0xFFFFFF }); pauseTitle.anchor.set(0.5, 0.5); pauseTitle.x = 2048 / 2; pauseTitle.y = 800; pauseMenu.addChild(pauseTitle); // Resume button var resumeButton = new MenuButton('▶️ DEVAM ET', 0x27ae60); resumeButton.x = 2048 / 2; resumeButton.y = 1200; resumeButton.onClick = function () { LK.getSound('Click').play(); togglePause(); }; pauseMenu.addChild(resumeButton); // Main menu button var mainMenuButton = new MenuButton('🏠 ANA MENÜ', 0xe74c3c); mainMenuButton.x = 2048 / 2; mainMenuButton.y = 1400; mainMenuButton.onClick = function () { LK.getSound('Click').play(); // Save game time before going to menu if (sessionStartTime > 0) { var sessionTime = Math.floor((Date.now() - sessionStartTime) / 1000); totalGameTime = (storage.totalGameTime || 0) + sessionTime; storage.totalGameTime = totalGameTime; sessionStartTime = 0; } // Save high score if current score is higher if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; } gamePaused = false; pauseMenu.destroy(); pauseMenu = null; pauseButton.visible = false; createMainMenu(); }; pauseMenu.addChild(mainMenuButton); // Settings button var settingsInGameButton = new MenuButton('⚙️ AYARLAR', 0xf39c12); settingsInGameButton.x = 2048 / 2; settingsInGameButton.y = 1600; settingsInGameButton.onClick = function () { LK.getSound('Click').play(); showSettings(); }; pauseMenu.addChild(settingsInGameButton); } else { // Hide pause menu if (pauseMenu) { pauseMenu.destroy(); pauseMenu = null; } } } function startGame() { gameState = 'countdown'; gamePaused = false; // Clear menu if (currentMenu) { currentMenu.destroy(); currentMenu = null; } // Start countdown sequence startCountdown(); } function startCountdown() { // Create countdown container var countdownContainer = new Container(); game.addChild(countdownContainer); // Create semi-transparent overlay var overlay = LK.getAsset('shape', { width: 2048, height: 2732, color: 0x000000, shape: 'box', anchorX: 0, anchorY: 0 }); overlay.alpha = 0.7; countdownContainer.addChild(overlay); // Countdown numbers var countdownNumbers = ['3', '2', '1', 'BAŞLA!']; var currentIndex = 0; function showNextNumber() { if (currentIndex >= countdownNumbers.length) { // Countdown finished, start actual game countdownContainer.destroy(); actuallyStartGame(); return; } // Create countdown text var countdownText = new Text2(countdownNumbers[currentIndex], { size: currentIndex === 3 ? 100 : 200, fill: currentIndex === 3 ? 0x27ae60 : 0xf1c40f }); countdownText.anchor.set(0.5, 0.5); countdownText.x = 2048 / 2; countdownText.y = 2732 / 2; countdownContainer.addChild(countdownText); // Initial animation - start big and fade in countdownText.scaleX = 3; countdownText.scaleY = 3; countdownText.alpha = 0; // Play countdown sound LK.getSound('Click').play(); // Animate the number tween(countdownText, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 300, easing: tween.bounceOut, onFinish: function onFinish() { // Hold for a moment then shrink and fade out LK.setTimeout(function () { tween(countdownText, { scaleX: 0.5, scaleY: 0.5, alpha: 0, rotation: Math.PI * 0.1 }, { duration: 200, easing: tween.easeIn, onFinish: function onFinish() { countdownText.destroy(); currentIndex++; showNextNumber(); } }); }, currentIndex === 3 ? 500 : 700); // Hold "BAŞLA!" longer } }); // Add pulsing glow effect function pulseGlow() { if (countdownText.parent) { tween(countdownText, { tint: 0xffffff }, { duration: 200, easing: tween.easeInOut, onFinish: function onFinish() { if (countdownText.parent) { tween(countdownText, { tint: currentIndex === 3 ? 0x27ae60 : 0xf1c40f }, { duration: 200, easing: tween.easeInOut }); } } }); } } // Start glow effect after initial animation LK.setTimeout(pulseGlow, 350); } // Start the countdown showNextNumber(); } function actuallyStartGame() { gameState = 'playing'; // Show score and ball collection display scoreTxt.visible = true; ballCountTxt.visible = true; pauseButton.visible = true; // Hide connection and premium indicators during gameplay connectionIndicator.visible = false; premiumIndicator.visible = false; pauseButton.text.setText('⏸️ DURAKLAT'); pauseButton.bg.tint = 0x34495e; updateBallDisplay(); // Clear existing baskets before creating new ones for (var i = baskets.length - 1; i >= 0; i--) { baskets[i].destroy(); } baskets = []; // Create baskets for (var i = 0; i < 3; i++) { var basket = new Basket(colors[i]); basket.x = 2048 / 4 * (i + 1); basket.y = 2732 - 200; baskets.push(basket); game.addChild(basket); } // Start background music only if enabled if (musicEnabled) { LK.playMusic('Background'); } // Start tracking game time for this session sessionStartTime = Date.now(); currentSessionStartTime = sessionStartTime; // Reset game variables and apply settings // Apply difficulty level var baseSpeed = difficultyLevel === 'Easy' ? 0.5 : difficultyLevel === 'Hard' ? 1.5 : 1.0; // Apply game speed setting var speedMultiplier = gameSpeedSetting === 'Slow' ? 0.7 : gameSpeedSetting === 'Fast' ? 1.3 : 1.0; gameSpeed = baseSpeed * speedMultiplier; consecutiveMatches = 0; LK.setScore(0); scoreTxt.setText('0'); // Reset power-ups slowMotionActive = false; doublePointsActive = false; slowMotionTimer = 0; doublePointsTimer = 0; powerUpSpawnTimer = 0; // Clear existing power-ups for (var p = powerUps.length - 1; p >= 0; p--) { powerUps[p].destroy(); } powerUps = []; // Reset ball collection for new game ballsCollected.red = 0; ballsCollected.blue = 0; ballsCollected.yellow = 0; storage.redBallsCollected = 0; storage.blueBallsCollected = 0; storage.yellowBallsCollected = 0; // Reset level completion status levelCompleted = false; // Reset level to 1 currentLevel = 1; storage.currentLevel = 1; } function showHowToPlay() { gameState = 'howtoplay'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var titleText = new Text2('NASIL OYNANIR', { size: 80, fill: 0xff6b6b }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 400; currentMenu.addChild(titleText); // Game objective section var objectiveText = new Text2('🎯 OYUNUN AMACI', { size: 60, fill: 0xf1c40f }); objectiveText.anchor.set(0.5, 0.5); objectiveText.x = 2048 / 2; objectiveText.y = 580; currentMenu.addChild(objectiveText); var objectiveDesc = new Text2('Yukarıdan düşen renkli şekilleri aynı renkteki sepetlerle yakalayın!\nDoğru renk eşleştirmeleri yaparak puan kazanın.', { size: 45, fill: 0xFFFFFF }); objectiveDesc.anchor.set(0.5, 0.5); objectiveDesc.x = 2048 / 2; objectiveDesc.y = 700; currentMenu.addChild(objectiveDesc); // Level system section var levelText = new Text2('🎮 BÖLÜM SİSTEMİ', { size: 60, fill: 0x3498db }); levelText.anchor.set(0.5, 0.5); levelText.x = 2048 / 2; levelText.y = 850; currentMenu.addChild(levelText); var levelDesc = new Text2('• BÖLÜM 1: Her renkten 5 top toplayın\n• BÖLÜM 2: Her renkten 10 top toplayın (SON BÖLÜM)\n• Her bölümde oyun daha da hızlanır!', { size: 40, fill: 0xFFFFFF }); levelDesc.anchor.set(0.5, 0.5); levelDesc.x = 2048 / 2; levelDesc.y = 970; currentMenu.addChild(levelDesc); // Controls section var controlsText = new Text2('📱 KONTROLLER', { size: 60, fill: 0x27ae60 }); controlsText.anchor.set(0.5, 0.5); controlsText.x = 2048 / 2; controlsText.y = 1120; currentMenu.addChild(controlsText); var controlsDesc = new Text2('• Sepetleri parmağınızla dokunup sürükleyin\n• Sepetler sadece sağa-sola hareket eder\n• Sepeti dokunduğunuz yere getirin', { size: 40, fill: 0xFFFFFF }); controlsDesc.anchor.set(0.5, 0.5); controlsDesc.x = 2048 / 2; controlsDesc.y = 1240; currentMenu.addChild(controlsDesc); // Scoring section var scoringText = new Text2('🏆 PUANLAMA SİSTEMİ', { size: 60, fill: 0xe67e22 }); scoringText.anchor.set(0.5, 0.5); scoringText.x = 2048 / 2; scoringText.y = 1390; currentMenu.addChild(scoringText); var scoringDesc = new Text2('• Doğru renk eşleştirme: +10 puan\n• Ardışık başarılı yakalamalar BONUS puan verir\n• Ne kadar çok yakalarsanız o kadar fazla puan!', { size: 40, fill: 0xFFFFFF }); scoringDesc.anchor.set(0.5, 0.5); scoringDesc.x = 2048 / 2; scoringDesc.y = 1510; currentMenu.addChild(scoringDesc); // Game over conditions var gameOverText = new Text2('❌ OYUN NASIL BİTER?', { size: 60, fill: 0xe74c3c }); gameOverText.anchor.set(0.5, 0.5); gameOverText.x = 2048 / 2; gameOverText.y = 1660; currentMenu.addChild(gameOverText); var gameOverDesc = new Text2('• Yanlış renkli sepete şekil düşürürseniz GAME OVER!\n• Herhangi bir şekli kaçırırsanız (yere düşerse) GAME OVER!\n• DİKKAT: Oyun sürekli hızlanır!', { size: 40, fill: 0xFFFFFF }); gameOverDesc.anchor.set(0.5, 0.5); gameOverDesc.x = 2048 / 2; gameOverDesc.y = 1780; currentMenu.addChild(gameOverDesc); // Tips section var tipsText = new Text2('💡 PRO İPUÇLARI', { size: 60, fill: 0x9b59b6 }); tipsText.anchor.set(0.5, 0.5); tipsText.x = 2048 / 2; tipsText.y = 1930; currentMenu.addChild(tipsText); var tipsDesc = new Text2('• Sepetleri şekil gelmeden ÖNCE konumlandırın\n• Hızlanan oyuna hazırlıklı olun\n• AYARLAR menüsünden zorluk seviyesini ayarlayın\n• Konsantre olun ve sakin kalın!', { size: 40, fill: 0xFFFFFF }); tipsDesc.anchor.set(0.5, 0.5); tipsDesc.x = 2048 / 2; tipsDesc.y = 2070; currentMenu.addChild(tipsDesc); // Enhanced back button with improved styling var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2300; // Add subtle animation to the back button tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(backButton, { alpha: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if (gameState === 'howtoplay') { tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut }); } } }); } }); backButton.onClick = function () { LK.getSound('Click').play(); // Add visual feedback on click tween(backButton.bg, { tint: 0x2c3e50 }, { duration: 100, onFinish: function onFinish() { tween(backButton.bg, { tint: 0x34495e }, { duration: 100 }); } }); createMainMenu(); }; currentMenu.addChild(backButton); } function showSettings() { gameState = 'settings'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Settings title var settingsText = new Text2('AYARLAR', { size: 80, fill: 0xFFFFFF }); settingsText.anchor.set(0.5, 0.5); settingsText.x = 2048 / 2; settingsText.y = 500; currentMenu.addChild(settingsText); // Music toggle button var musicButton = new MenuButton(musicEnabled ? 'Oyun başlayınca arka plan müziği: açık' : 'Oyun başlayınca arka plan müziği: kapalı', musicEnabled ? 0x27ae60 : 0xe74c3c); musicButton.x = 2048 / 2; musicButton.y = 700; musicButton.onClick = function () { LK.getSound('Click').play(); musicEnabled = !musicEnabled; storage.musicEnabled = musicEnabled; // Save music preference if (musicEnabled) { LK.playMusic('Background'); musicButton.text.setText('Oyun başlayınca arka plan müziği: açık'); musicButton.bg.tint = 0x27ae60; } else { LK.stopMusic(); musicButton.text.setText('Oyun başlayınca arka plan müziği: kapalı'); musicButton.bg.tint = 0xe74c3c; } }; currentMenu.addChild(musicButton); // Difficulty Level button var difficultyButton = new MenuButton('Zorluk: ' + difficultyLevel, 0x8e44ad); difficultyButton.x = 2048 / 2; difficultyButton.y = 900; difficultyButton.onClick = function () { LK.getSound('Click').play(); var levels = ['Easy', 'Normal', 'Hard']; var currentIndex = levels.indexOf(difficultyLevel); difficultyLevel = levels[(currentIndex + 1) % levels.length]; storage.difficultyLevel = difficultyLevel; difficultyButton.text.setText('Zorluk: ' + difficultyLevel); var colors = [0x27ae60, 0xf39c12, 0xe74c3c]; difficultyButton.bg.tint = colors[levels.indexOf(difficultyLevel)]; }; currentMenu.addChild(difficultyButton); // Game Speed button var speedButton = new MenuButton('Hız: ' + gameSpeedSetting, 0x3498db); speedButton.x = 2048 / 2; speedButton.y = 1100; speedButton.onClick = function () { LK.getSound('Click').play(); var speeds = ['Slow', 'Normal', 'Fast']; var currentIndex = speeds.indexOf(gameSpeedSetting); gameSpeedSetting = speeds[(currentIndex + 1) % speeds.length]; storage.gameSpeedSetting = gameSpeedSetting; speedButton.text.setText('Hız: ' + gameSpeedSetting); var colors = [0x95a5a6, 0x3498db, 0xe67e22]; speedButton.bg.tint = colors[speeds.indexOf(gameSpeedSetting)]; }; currentMenu.addChild(speedButton); // Color Mode button var colorButton = new MenuButton('Renk: ' + colorMode, 0x16a085); colorButton.x = 2048 / 2; colorButton.y = 1300; colorButton.onClick = function () { LK.getSound('Click').play(); var modes = ['Normal', 'ColorBlind']; var currentIndex = modes.indexOf(colorMode); colorMode = modes[(currentIndex + 1) % modes.length]; storage.colorMode = colorMode; colorButton.text.setText('Renk: ' + colorMode); colorButton.bg.tint = colorMode === 'Normal' ? 0x16a085 : 0x34495e; }; currentMenu.addChild(colorButton); // Shape Size button var sizeButton = new MenuButton('Boyut: ' + shapeSize, 0xd35400); sizeButton.x = 2048 / 2; sizeButton.y = 1500; sizeButton.onClick = function () { LK.getSound('Click').play(); var sizes = ['Small', 'Normal', 'Large']; var currentIndex = sizes.indexOf(shapeSize); shapeSize = sizes[(currentIndex + 1) % sizes.length]; storage.shapeSize = shapeSize; sizeButton.text.setText('Boyut: ' + shapeSize); var colors = [0x95a5a6, 0xd35400, 0x8e44ad]; sizeButton.bg.tint = colors[sizes.indexOf(shapeSize)]; }; currentMenu.addChild(sizeButton); // Graphics settings section title var graphicsTitle = new Text2('🎨 GRAFİK AYARLARI', { size: 60, fill: 0xff6b6b }); graphicsTitle.anchor.set(0.5, 0.5); graphicsTitle.x = 2048 / 2; graphicsTitle.y = 1650; currentMenu.addChild(graphicsTitle); // Particle effects button var particleEffectsEnabled = storage.particleEffectsEnabled !== undefined ? storage.particleEffectsEnabled : true; var particleButton = new MenuButton(particleEffectsEnabled ? '✨ Partikül Efektleri: Açık' : '✨ Partikül Efektleri: Kapalı', particleEffectsEnabled ? 0x27ae60 : 0xe74c3c); particleButton.x = 2048 / 2; particleButton.y = 1800; particleButton.onClick = function () { LK.getSound('Click').play(); particleEffectsEnabled = !particleEffectsEnabled; storage.particleEffectsEnabled = particleEffectsEnabled; if (particleEffectsEnabled) { particleButton.text.setText('✨ Partikül Efektleri: Açık'); particleButton.bg.tint = 0x27ae60; } else { particleButton.text.setText('✨ Partikül Efektleri: Kapalı'); particleButton.bg.tint = 0xe74c3c; } }; currentMenu.addChild(particleButton); // Screen effects button var screenEffectsEnabled = storage.screenEffectsEnabled !== undefined ? storage.screenEffectsEnabled : true; var screenButton = new MenuButton(screenEffectsEnabled ? '💥 Ekran Efektleri: Açık' : '💥 Ekran Efektleri: Kapalı', screenEffectsEnabled ? 0x27ae60 : 0xe74c3c); screenButton.x = 2048 / 2; screenButton.y = 1950; screenButton.onClick = function () { LK.getSound('Click').play(); screenEffectsEnabled = !screenEffectsEnabled; storage.screenEffectsEnabled = screenEffectsEnabled; if (screenEffectsEnabled) { screenButton.text.setText('💥 Ekran Efektleri: Açık'); screenButton.bg.tint = 0x27ae60; } else { screenButton.text.setText('💥 Ekran Efektleri: Kapalı'); screenButton.bg.tint = 0xe74c3c; } }; currentMenu.addChild(screenButton); // Animation quality button var animationQuality = storage.animationQuality || 'High'; var animationButton = new MenuButton('🎭 Animasyon Kalitesi: ' + animationQuality, 0x9b59b6); animationButton.x = 2048 / 2; animationButton.y = 2100; animationButton.onClick = function () { LK.getSound('Click').play(); var qualities = ['Low', 'Medium', 'High']; var currentIndex = qualities.indexOf(animationQuality); animationQuality = qualities[(currentIndex + 1) % qualities.length]; storage.animationQuality = animationQuality; animationButton.text.setText('🎭 Animasyon Kalitesi: ' + animationQuality); var colors = [0x95a5a6, 0xf39c12, 0x9b59b6]; animationButton.bg.tint = colors[qualities.indexOf(animationQuality)]; }; currentMenu.addChild(animationButton); // Enhanced back button with improved styling var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2250; // Add subtle animation to the back button tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(backButton, { alpha: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if (gameState === 'settings') { tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut }); } } }); } }); backButton.onClick = function () { LK.getSound('Click').play(); // Add visual feedback on click tween(backButton.bg, { tint: 0x2c3e50 }, { duration: 100, onFinish: function onFinish() { tween(backButton.bg, { tint: 0x34495e }, { duration: 100 }); } }); createMainMenu(); }; currentMenu.addChild(backButton); } function showStatistics() { gameState = 'statistics'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Statistics title var statisticsTitle = new Text2('İSTATİSTİKLERİM', { size: 80, fill: 0x6c5ce7 }); statisticsTitle.anchor.set(0.5, 0.5); statisticsTitle.x = 2048 / 2; statisticsTitle.y = 500; currentMenu.addChild(statisticsTitle); // High score section var highScoreTitle = new Text2('🏆 EN YÜKSEK SKOR', { size: 60, fill: 0xf1c40f }); highScoreTitle.anchor.set(0.5, 0.5); highScoreTitle.x = 2048 / 2; highScoreTitle.y = 700; currentMenu.addChild(highScoreTitle); var highScoreValue = new Text2(highScore.toString(), { size: 80, fill: 0xFFFFFF }); highScoreValue.anchor.set(0.5, 0.5); highScoreValue.x = 2048 / 2; highScoreValue.y = 800; currentMenu.addChild(highScoreValue); // Total game time section var gameTimeTitle = new Text2('⏰ TOPLAM OYUN SÜRESİ', { size: 60, fill: 0x9b59b6 }); gameTimeTitle.anchor.set(0.5, 0.5); gameTimeTitle.x = 2048 / 2; gameTimeTitle.y = 1000; currentMenu.addChild(gameTimeTitle); // Get the most current total time from storage var currentTotalTime = storage.totalGameTime || 0; var gameTimeValue = new Text2(formatGameTime(currentTotalTime), { size: 70, fill: 0xFFFFFF }); gameTimeValue.anchor.set(0.5, 0.5); gameTimeValue.x = 2048 / 2; gameTimeValue.y = 1120; currentMenu.addChild(gameTimeValue); // Achievement section var achievementsTitle = new Text2('🎯 BAŞARILARINIZ', { size: 60, fill: 0x27ae60 }); achievementsTitle.anchor.set(0.5, 0.5); achievementsTitle.x = 2048 / 2; achievementsTitle.y = 1320; currentMenu.addChild(achievementsTitle); // Show achievements based on high score var achievementText = ''; if (highScore >= 1000) { achievementText = '• Efsane Oyuncu: 1000+ puan\n• Usta Oyuncu: 500+ puan\n• Deneyimli Oyuncu: 100+ puan\n• Başlangıç: İlk oyun'; } else if (highScore >= 500) { achievementText = '• Usta Oyuncu: 500+ puan\n• Deneyimli Oyuncu: 100+ puan\n• Başlangıç: İlk oyun'; } else if (highScore >= 100) { achievementText = '• Deneyimli Oyuncu: 100+ puan\n• Başlangıç: İlk oyun'; } else if (highScore > 0) { achievementText = '• Başlangıç: İlk oyun'; } else { achievementText = 'Henüz hiç oynamadınız!\nOyuna başlayarak ilk başarımınızı kazanın.'; } var achievementsList = new Text2(achievementText, { size: 45, fill: 0xecf0f1 }); achievementsList.anchor.set(0.5, 0.5); achievementsList.x = 2048 / 2; achievementsList.y = 1480; currentMenu.addChild(achievementsList); // Progress section var progressTitle = new Text2('📊 SONRAKI BAŞARIM', { size: 60, fill: 0x3498db }); progressTitle.anchor.set(0.5, 0.5); progressTitle.x = 2048 / 2; progressTitle.y = 1680; currentMenu.addChild(progressTitle); var nextGoal = ''; if (highScore < 100) { nextGoal = 'Deneyimli Oyuncu için ' + (100 - highScore) + ' puan daha'; } else if (highScore < 500) { nextGoal = 'Usta Oyuncu için ' + (500 - highScore) + ' puan daha'; } else if (highScore < 1000) { nextGoal = 'Efsane Oyuncu için ' + (1000 - highScore) + ' puan daha'; } else { nextGoal = 'Tüm başarımları tamamladınız!'; } var nextGoalText = new Text2(nextGoal, { size: 50, fill: 0xbdc3c7 }); nextGoalText.anchor.set(0.5, 0.5); nextGoalText.x = 2048 / 2; nextGoalText.y = 1780; currentMenu.addChild(nextGoalText); // Back button var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2000; backButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(backButton); } function showCreators() { gameState = 'creators'; // Stop background music and play Creators music LK.stopMusic(); LK.playMusic('Creators'); // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Creators title with animated styling var creatorsTitle = new Text2('🎮 YAPIMCILAR 🎮', { size: 90, fill: 0xff6b6b }); creatorsTitle.anchor.set(0.5, 0.5); creatorsTitle.x = 2048 / 2; creatorsTitle.y = 500; currentMenu.addChild(creatorsTitle); // Animate title with color cycling var titleColors = [0xff6b6b, 0xfeca57, 0x4da6ff, 0x9b59b6]; // Red, Yellow, Blue, Purple var currentColorIndex = 0; function animateCreatorsTitle() { currentColorIndex = (currentColorIndex + 1) % titleColors.length; tween(creatorsTitle, { tint: titleColors[currentColorIndex], scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(creatorsTitle, { scaleX: 1, scaleY: 1 }, { duration: 500, onFinish: animateCreatorsTitle }); } }); } animateCreatorsTitle(); // Game development section var gameDevTitle = new Text2('🎯 OYUN GELİŞTİRME EKİBİ', { size: 65, fill: 0xf1c40f }); gameDevTitle.anchor.set(0.5, 0.5); gameDevTitle.x = 2048 / 2; gameDevTitle.y = 700; currentMenu.addChild(gameDevTitle); // Lead developer var leadDeveloperText = new Text2('👨💻 Ana Geliştirici: Şafak\n\n🔧 Oyun Motoru: FRVR LK Engine\n💻 Programlama: JavaScript\n🎨 Grafik Tasarım: Dijital Sanat', { size: 50, fill: 0xFFFFFF }); leadDeveloperText.anchor.set(0.5, 0.5); leadDeveloperText.x = 2048 / 2; leadDeveloperText.y = 950; currentMenu.addChild(leadDeveloperText); // Special thanks section var thanksTitle = new Text2('🙏 TEŞEKKÜRLER', { size: 60, fill: 0x27ae60 }); thanksTitle.anchor.set(0.5, 0.5); thanksTitle.x = 2048 / 2; thanksTitle.y = 1200; currentMenu.addChild(thanksTitle); var thanksText = new Text2('• FRVR oyun platformu ve geliştirme araçları\n• Oyuncularımızın değerli geri bildirimleri\n• Beta test sürecindeki katkıları\n• Müzik ve ses efektleri için açık kaynak topluluk', { size: 45, fill: 0xecf0f1 }); thanksText.anchor.set(0.5, 0.5); thanksText.x = 2048 / 2; thanksText.y = 1400; currentMenu.addChild(thanksText); // Game info section var gameInfoTitle = new Text2('ℹ️ OYUN BİLGİLERİ', { size: 60, fill: 0x3498db }); gameInfoTitle.anchor.set(0.5, 0.5); gameInfoTitle.x = 2048 / 2; gameInfoTitle.y = 1600; currentMenu.addChild(gameInfoTitle); var gameInfoText = new Text2('📅 Geliştirme Başlangıcı: 2024\n🎮 Platform: FRVR\n📱 Desteklenen Cihazlar: Mobil & Masaüstü\n🌍 Dil Desteği: Türkçe', { size: 45, fill: 0xbdc3c7 }); gameInfoText.anchor.set(0.5, 0.5); gameInfoText.x = 2048 / 2; gameInfoText.y = 1780; currentMenu.addChild(gameInfoText); // Contact section var contactTitle = new Text2('📞 İLETİŞİM', { size: 60, fill: 0xe67e22 }); contactTitle.anchor.set(0.5, 0.5); contactTitle.x = 2048 / 2; contactTitle.y = 1980; currentMenu.addChild(contactTitle); var contactText = new Text2('Geri bildirimleriniz ve önerileriniz için:\n🎮 FRVR platform üzerinden mesaj gönderebilirsiniz', { size: 45, fill: 0x95a5a6 }); contactText.anchor.set(0.5, 0.5); contactText.x = 2048 / 2; contactText.y = 2100; currentMenu.addChild(contactText); // Back button var backButton = new MenuButton('🔙 ANA MENÜYE DÖN', 0x95a5a6); backButton.x = 2048 / 2; backButton.y = 2300; backButton.onClick = function () { LK.getSound('Click').play(); // Stop Creators music and restore background music if enabled LK.stopMusic(); if (musicEnabled) { LK.playMusic('Background'); } createMainMenu(); }; currentMenu.addChild(backButton); } // Check if user is already logged in var userLoggedIn = storage.userLoggedIn || false; // Create login screen function function createLoginScreen() { gameState = 'login'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Play main menu background music if (musicEnabled) { LK.playMusic('Mainmenubackground'); } // Login screen title var titleText = new Text2('TOPLARI YAKALA', { size: 100, fill: 0xffff00 }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 600; currentMenu.addChild(titleText); // Welcome text var welcomeText = new Text2('OYUNA HOŞGELDİNİZ', { size: 60, fill: 0xFFFFFF }); welcomeText.anchor.set(0.5, 0.5); welcomeText.x = 2048 / 2; welcomeText.y = 800; currentMenu.addChild(welcomeText); // Guest login button var guestButton = new MenuButton('👤 MİSAFİR OLARAK GİRİŞ YAP', 0x27ae60); guestButton.x = 2048 / 2; guestButton.y = 1200; // Enhanced guest button animations function pulseGuestButton() { tween(guestButton, { scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(guestButton, { scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: pulseGuestButton }); } }); } // Color cycling animation var guestColors = [0x27ae60, 0x2ecc71, 0x1abc9c, 0x16a085]; var currentGuestColorIndex = 0; function animateGuestButton() { currentGuestColorIndex = (currentGuestColorIndex + 1) % guestColors.length; tween(guestButton.bg, { tint: guestColors[currentGuestColorIndex] }, { duration: 800, easing: tween.easeInOut, onFinish: animateGuestButton }); } // Start animations pulseGuestButton(); animateGuestButton(); guestButton.onClick = function () { LK.getSound('Click').play(); // Save guest login status storage.userLoggedIn = true; storage.loginType = 'guest'; userLoggedIn = true; // Enhanced click animation tween(guestButton, { scaleX: 1.2, scaleY: 1.2, rotation: Math.PI * 0.05 }, { duration: 150, easing: tween.bounceOut, onFinish: function onFinish() { tween(guestButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { createMainMenu(); } }); } }); }; currentMenu.addChild(guestButton); // Register button var registerButton = new MenuButton('📝 KAYIT OL', 0x3498db); registerButton.x = 2048 / 2; registerButton.y = 1400; // Enhanced register button animations function pulseRegisterButton() { tween(registerButton, { scaleX: 1.08, scaleY: 1.08 }, { duration: 1200, easing: tween.easeInOut, onFinish: function onFinish() { tween(registerButton, { scaleX: 1, scaleY: 1 }, { duration: 1200, easing: tween.easeInOut, onFinish: pulseRegisterButton }); } }); } // Color cycling for register button var registerColors = [0x3498db, 0x2980b9, 0x9b59b6, 0x8e44ad]; var currentRegisterColorIndex = 0; function animateRegisterButton() { currentRegisterColorIndex = (currentRegisterColorIndex + 1) % registerColors.length; tween(registerButton.bg, { tint: registerColors[currentRegisterColorIndex] }, { duration: 1000, easing: tween.easeInOut, onFinish: animateRegisterButton }); } // Start animations pulseRegisterButton(); animateRegisterButton(); registerButton.onClick = function () { LK.getSound('Click').play(); // Enhanced click animation tween(registerButton, { scaleX: 1.3, scaleY: 1.3, rotation: Math.PI * 0.1 }, { duration: 200, easing: tween.bounceOut, onFinish: function onFinish() { tween(registerButton, { scaleX: 1, scaleY: 1, rotation: 0 }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { // Show register screen or message showRegisterInfo(); } }); } }); }; currentMenu.addChild(registerButton); // Privacy and Security Section var privacyTitle = new Text2('🔒 GÜVENLİK VE GİZLİLİK', { size: 50, fill: 0x27ae60 }); privacyTitle.anchor.set(0.5, 0.5); privacyTitle.x = 2048 / 2; privacyTitle.y = 1600; currentMenu.addChild(privacyTitle); // Secure connection indicator var secureConnectionText = new Text2('🔐 Güvenli Bağlantı Aktif', { size: 35, fill: 0x27ae60 }); secureConnectionText.anchor.set(0.5, 0.5); secureConnectionText.x = 2048 / 2; secureConnectionText.y = 1680; currentMenu.addChild(secureConnectionText); // Privacy policy link var privacyPolicyButton = new MenuButton('📄 Gizlilik Politikası', 0x3498db); privacyPolicyButton.x = 2048 / 4; privacyPolicyButton.y = 1780; privacyPolicyButton.onClick = function () { LK.getSound('Click').play(); showPrivacyPolicy(); }; currentMenu.addChild(privacyPolicyButton); // Terms of service link var termsButton = new MenuButton('📋 Kullanım Şartları', 0x9b59b6); termsButton.x = 2048 * 3 / 4; termsButton.y = 1780; termsButton.onClick = function () { LK.getSound('Click').play(); showTermsOfService(); }; currentMenu.addChild(termsButton); // Social proof and trust section var socialProofTitle = new Text2('🏆 OYUNCU İSTATİSTİKLERİ', { size: 50, fill: 0x27ae60 }); socialProofTitle.anchor.set(0.5, 0.5); socialProofTitle.x = 2048 / 2; socialProofTitle.y = 1880; currentMenu.addChild(socialProofTitle); // User statistics with animated counters var userStatsText = new Text2('📊 50.000+ Kayıtlı Oyuncu\n🎯 En Yüksek Skor: 15.000 Puan\n🎮 Bu Hafta: 2.500+ Aktif Oyuncu', { size: 42, fill: 0xFFFFFF }); userStatsText.anchor.set(0.5, 0.5); userStatsText.x = 2048 / 2; userStatsText.y = 1980; currentMenu.addChild(userStatsText); // Add pulsing animation to statistics tween(userStatsText, { alpha: 0.7 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(userStatsText, { alpha: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { if (gameState === 'login') { tween(userStatsText, { alpha: 0.7 }, { duration: 1500, easing: tween.easeInOut }); } } }); } }); // Rating system display var ratingText = new Text2('⭐⭐⭐⭐⭐ (4.8/5) - 2.500 Değerlendirme', { size: 45, fill: 0xf1c40f }); ratingText.anchor.set(0.5, 0.5); ratingText.x = 2048 / 2; ratingText.y = 2120; currentMenu.addChild(ratingText); // Animate rating with golden glow effect tween(ratingText, { tint: 0xfeca57, scaleX: 1.05, scaleY: 1.05 }, { duration: 1200, easing: tween.easeInOut, onFinish: function onFinish() { tween(ratingText, { tint: 0xf1c40f, scaleX: 1, scaleY: 1 }, { duration: 1200, easing: tween.easeInOut, onFinish: function onFinish() { if (gameState === 'login') { tween(ratingText, { tint: 0xfeca57, scaleX: 1.05, scaleY: 1.05 }, { duration: 1200, easing: tween.easeInOut }); } } }); } }); // Security certificates display var securityText = new Text2('🔒 SSL Güvenli • 🛡️ Veri Koruması Sertifikası • ✅ GDPR Uyumlu', { size: 38, fill: 0x27ae60 }); securityText.anchor.set(0.5, 0.5); securityText.x = 2048 / 2; securityText.y = 2220; currentMenu.addChild(securityText); // Social Media and Community Section var socialTitle = new Text2('🌐 SOSYAL MEDYA VE TOPLULUK', { size: 50, fill: 0x3498db }); socialTitle.anchor.set(0.5, 0.5); socialTitle.x = 2048 / 2; socialTitle.y = 2340; currentMenu.addChild(socialTitle); // Social media buttons row var facebookButton = new MenuButton('📘 Facebook', 0x4267B2); facebookButton.x = 2048 / 4; facebookButton.y = 2450; // Scale down social buttons facebookButton.scaleX = 0.8; facebookButton.scaleY = 0.8; facebookButton.onClick = function () { LK.getSound('Click').play(); // Simulate opening Facebook page LK.effects.flashScreen(0x4267B2, 300); }; currentMenu.addChild(facebookButton); var twitterButton = new MenuButton('🐦 Twitter', 0x1DA1F2); twitterButton.x = 2048 * 3 / 4; twitterButton.y = 2450; // Scale down social buttons twitterButton.scaleX = 0.8; twitterButton.scaleY = 0.8; twitterButton.onClick = function () { LK.getSound('Click').play(); // Simulate opening Twitter page LK.effects.flashScreen(0x1DA1F2, 300); }; currentMenu.addChild(twitterButton); // Friend invitation feature var inviteFriendsButton = new MenuButton('👥 ARKADAŞLARI DAVET ET', 0x27ae60); inviteFriendsButton.x = 2048 / 2; inviteFriendsButton.y = 2570; // Enhanced invite button animations function pulseInviteButton() { tween(inviteFriendsButton, { scaleX: 1.05, scaleY: 1.05 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(inviteFriendsButton, { scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: pulseInviteButton }); } }); } pulseInviteButton(); inviteFriendsButton.onClick = function () { LK.getSound('Click').play(); // Show friend invitation screen showFriendInvitation(); }; currentMenu.addChild(inviteFriendsButton); // Community links var communityButton = new MenuButton('💬 TOPLULUK - Discord', 0x7289DA); communityButton.x = 2048 / 2; communityButton.y = 2690; communityButton.onClick = function () { LK.getSound('Click').play(); // Simulate opening Discord community LK.effects.flashScreen(0x7289DA, 300); }; currentMenu.addChild(communityButton); // Info text var infoText = new Text2('Misafir girişi ile tüm özelliklere erişebilirsiniz.\nKayıt olarak ilerlemenizi kaybetmeden oynayabilirsiniz.', { size: 40, fill: 0xbdc3c7 }); infoText.anchor.set(0.5, 0.5); infoText.x = 2048 / 2; infoText.y = 2800; currentMenu.addChild(infoText); } // Function to show register information function showRegisterInfo() { // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var titleText = new Text2('KAYIT OL', { size: 80, fill: 0x3498db }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 600; currentMenu.addChild(titleText); // Info message var infoText = new Text2('Kayıt özelliği yakında gelecek!\n\nŞu an için misafir girişi ile\ntüm oyun özelliklerini kullanabilirsiniz.', { size: 50, fill: 0xFFFFFF }); infoText.anchor.set(0.5, 0.5); infoText.x = 2048 / 2; infoText.y = 1000; currentMenu.addChild(infoText); // Social proof section for registration var socialProofTitle = new Text2('🌟 NEDEN BİZE GÜVENİYORLAR?', { size: 55, fill: 0x3498db }); socialProofTitle.anchor.set(0.5, 0.5); socialProofTitle.x = 2048 / 2; socialProofTitle.y = 1200; currentMenu.addChild(socialProofTitle); // Trust indicators with animated effects var trustText = new Text2('👥 50.000+ Güvenli Kullanıcı\n⭐ 4.8/5 Kullanıcı Memnuniyeti\n🏆 "En İyi Mobil Oyun" Ödülü\n🔒 %100 Güvenli Veri Saklama', { size: 45, fill: 0x27ae60 }); trustText.anchor.set(0.5, 0.5); trustText.x = 2048 / 2; trustText.y = 1350; currentMenu.addChild(trustText); // Add trust badge glow animation tween(trustText, { alpha: 0.8, scaleX: 1.02, scaleY: 1.02 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(trustText, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { if (gameState === 'register') { tween(trustText, { alpha: 0.8, scaleX: 1.02, scaleY: 1.02 }, { duration: 1000, easing: tween.easeInOut }); } } }); } }); // Registration benefits var benefitsText = new Text2('KAYIT AVANTAJLARI:\n• ☁️ İlerlemeniz bulutta saklanacak\n• 🏆 Başarımlarınız kalıcı olacak\n• 📊 Liderlik tablosunda yer alacaksınız\n• 🎁 Özel kayıt bonusu alacaksınız', { size: 42, fill: 0xFFFFFF }); benefitsText.anchor.set(0.5, 0.5); benefitsText.x = 2048 / 2; benefitsText.y = 1550; currentMenu.addChild(benefitsText); // Temporary guest login button var tempGuestButton = new MenuButton('👤 MİSAFİR GİRİŞİ YAP', 0x27ae60); tempGuestButton.x = 2048 / 2; tempGuestButton.y = 1700; tempGuestButton.onClick = function () { LK.getSound('Click').play(); storage.userLoggedIn = true; storage.loginType = 'guest'; userLoggedIn = true; createMainMenu(); }; currentMenu.addChild(tempGuestButton); // Privacy and Security Links var privacyLinksTitle = new Text2('📋 YASAL BELGELER', { size: 50, fill: 0x3498db }); privacyLinksTitle.anchor.set(0.5, 0.5); privacyLinksTitle.x = 2048 / 2; privacyLinksTitle.y = 1800; currentMenu.addChild(privacyLinksTitle); // Privacy policy link var privacyPolicyButton = new MenuButton('📄 Gizlilik Politikası', 0x3498db); privacyPolicyButton.x = 2048 / 4; privacyPolicyButton.y = 1900; privacyPolicyButton.onClick = function () { LK.getSound('Click').play(); showPrivacyPolicy(); }; currentMenu.addChild(privacyPolicyButton); // Terms of service link var termsButton = new MenuButton('📋 Kullanım Şartları', 0x9b59b6); termsButton.x = 2048 * 3 / 4; termsButton.y = 1900; termsButton.onClick = function () { LK.getSound('Click').play(); showTermsOfService(); }; currentMenu.addChild(termsButton); // Back button var backButton = new MenuButton('⬅ GERİ DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2150; backButton.onClick = function () { LK.getSound('Click').play(); createLoginScreen(); }; currentMenu.addChild(backButton); } // Always show login screen every time the game starts createLoginScreen(); // Spawn falling shapes function spawnShape() { var randomColor = colors[Math.floor(Math.random() * colors.length)]; var shape = new FallingShape(randomColor); shape.x = Math.random() * (2048 - 160) + 80; shape.y = -80; // Apply difficulty and speed settings to shape speed var baseFallSpeed = difficultyLevel === 'Easy' ? 2 : difficultyLevel === 'Hard' ? 4 : 3; var speedMultiplier = gameSpeedSetting === 'Slow' ? 0.7 : gameSpeedSetting === 'Fast' ? 1.3 : 1.0; shape.speed = baseFallSpeed * speedMultiplier + gameSpeed * 0.5; // Apply slow motion effect if active if (slowMotionActive) { shape.speed *= 0.5; } // Add beautiful entrance animation based on quality settings var animationQuality = storage.animationQuality || 'High'; if (animationQuality !== 'Low') { // Start with small scale and fade in shape.scaleX = 0.1; shape.scaleY = 0.1; shape.alpha = 0; // Animate scale with bounce effect var animDuration = animationQuality === 'Medium' ? 200 : 300; tween(shape, { scaleX: 1.2, scaleY: 1.2, alpha: 1 }, { duration: animDuration, easing: tween.bounceOut, onFinish: function onFinish() { tween(shape, { scaleX: 1, scaleY: 1 }, { duration: animDuration * 0.67, easing: tween.easeOut }); } }); // Add subtle rotation animation only on high quality if (animationQuality === 'High') { tween(shape, { rotation: Math.PI * 0.1 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { tween(shape, { rotation: -Math.PI * 0.1 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { // Continue subtle rotation loop if (shape.parent) { tween(shape, { rotation: 0 }, { duration: 400, easing: tween.easeInOut }); } } }); } }); } } fallingShapes.push(shape); game.addChild(shape); } // Handle touch/mouse events function handleMove(x, y, obj) { if (gameState === 'playing' && draggedBasket) { draggedBasket.x = Math.max(100, Math.min(1948, x)); } } game.move = handleMove; game.down = function (x, y, obj) { // Only handle basket dragging during gameplay if (gameState !== 'playing') { return; } // Check if touch is on any basket for (var i = 0; i < baskets.length; i++) { var basket = baskets[i]; var dx = x - basket.x; var dy = y - basket.y; if (Math.abs(dx) < 100 && Math.abs(dy) < 60) { draggedBasket = basket; break; } } }; game.up = function (x, y, obj) { draggedBasket = null; }; // Main game loop var shapeSpawnTimer = 0; var difficultyTimer = 0; game.update = function () { // Update background particles (always running) var particleEffectsEnabled = storage.particleEffectsEnabled !== undefined ? storage.particleEffectsEnabled : true; if (particleEffectsEnabled) { particleSpawnTimer++; var spawnRate = storage.animationQuality === 'Low' ? 40 : storage.animationQuality === 'Medium' ? 30 : 20; if (particleSpawnTimer >= spawnRate) { // Spawn particle every spawnRate frames var particle = new BackgroundParticle(); particle.x = Math.random() * 2048; particle.y = 2732 + 50; // Start below screen backgroundParticles.push(particle); backgroundContainer.addChild(particle); particleSpawnTimer = 0; } } // Update and clean up particles for (var p = backgroundParticles.length - 1; p >= 0; p--) { var particle = backgroundParticles[p]; if (particle.shouldRemove) { particle.destroy(); backgroundParticles.splice(p, 1); } } // Only run game logic when actually playing and not paused if (gameState !== 'playing' || gamePaused) { return; } // Update power-up timers if (slowMotionActive) { slowMotionTimer--; if (slowMotionTimer <= 0) { slowMotionActive = false; updateBallDisplay(); } } if (doublePointsActive) { doublePointsTimer--; if (doublePointsTimer <= 0) { doublePointsActive = false; updateBallDisplay(); } } // Spawn power-ups occasionally powerUpSpawnTimer++; if (powerUpSpawnTimer >= 900) { // Every 15 seconds if (Math.random() < 0.7) { // 70% chance to spawn var powerUpType = Math.random() < 0.5 ? 'slowMotion' : 'doublePoints'; var powerUp = new PowerUp(powerUpType); powerUp.x = Math.random() * (2048 - 120) + 60; powerUp.y = -60; powerUps.push(powerUp); game.addChild(powerUp); } powerUpSpawnTimer = 0; } // Update power-ups for (var p = powerUps.length - 1; p >= 0; p--) { var powerUp = powerUps[p]; // Check if power-up went off screen if (powerUp.lastY < 2732 && powerUp.y >= 2732) { powerUp.destroy(); powerUps.splice(p, 1); continue; } // Check collision with baskets for (var j = 0; j < baskets.length; j++) { var basket = baskets[j]; if (powerUp.intersects(basket)) { // Activate power-up LK.getSound('powerup').play(); if (powerUp.type === 'slowMotion') { slowMotionActive = true; slowMotionTimer = 600; // 10 seconds } else if (powerUp.type === 'doublePoints') { doublePointsActive = true; doublePointsTimer = 600; // 10 seconds } updateBallDisplay(); // Visual effect LK.effects.flashScreen(powerUp.type === 'slowMotion' ? 0x3498db : 0xf1c40f, 300); powerUp.destroy(); powerUps.splice(p, 1); break; } } } // Spawn shapes shapeSpawnTimer++; // Calculate spawn interval based on difficulty and slow motion var baseInterval = difficultyLevel === 'Easy' ? 150 : difficultyLevel === 'Hard' ? 90 : 120; var spawnInterval = Math.max(30, baseInterval - gameSpeed * 10); if (slowMotionActive) { spawnInterval *= 1.5; // Slow down spawning during slow motion } if (shapeSpawnTimer >= spawnInterval) { spawnShape(); shapeSpawnTimer = 0; } // Update difficulty difficultyTimer++; if (difficultyTimer >= 600) { // Every 10 seconds gameSpeed += 0.2; difficultyTimer = 0; } // Update falling shapes for (var i = fallingShapes.length - 1; i >= 0; i--) { var shape = fallingShapes[i]; // Check if shape went off screen if (shape.lastY < 2732 && shape.y >= 2732) { // Shape missed - game over // Save final game time if (sessionStartTime > 0) { var sessionTime = Math.floor((Date.now() - sessionStartTime) / 1000); totalGameTime = (storage.totalGameTime || 0) + sessionTime; storage.totalGameTime = totalGameTime; sessionStartTime = 0; // Reset session start time } // Save high score if current score is higher if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; } LK.getSound('miss').play(); var screenEffectsEnabled = storage.screenEffectsEnabled !== undefined ? storage.screenEffectsEnabled : true; if (screenEffectsEnabled) { LK.effects.flashScreen(0xff0000, 500); } LK.showGameOver(); return; } // Check collision with baskets var caught = false; for (var j = 0; j < baskets.length; j++) { var basket = baskets[j]; if (shape.intersects(basket)) { if (shape.color === basket.color) { // Correct match consecutiveMatches++; var points = 10 + consecutiveMatches * 2; // Apply double points if active if (doublePointsActive) { points *= 2; } LK.setScore(LK.getScore() + points); scoreTxt.setText(LK.getScore()); // Update ball collection count ballsCollected[shape.color]++; storage[shape.color + 'BallsCollected'] = ballsCollected[shape.color]; updateBallDisplay(); // Check if all requirements are met if (ballsCollected.red >= ballRequirements.red && ballsCollected.blue >= ballRequirements.blue && ballsCollected.yellow >= ballRequirements.yellow) { // If this is level 2 (final level), show you win if (currentLevel === 2) { // Save final game time if (sessionStartTime > 0) { var sessionTime = Math.floor((Date.now() - sessionStartTime) / 1000); totalGameTime = (storage.totalGameTime || 0) + sessionTime; storage.totalGameTime = totalGameTime; sessionStartTime = 0; } // Save high score if current score is higher if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; } LK.showYouWin(); } else { showLevelComplete(); } return; } LK.getSound('catch').play(); LK.getSound('basketball').play(); // Visual feedback tween(basket, { scaleX: 1.2, scaleY: 1.2 }, { duration: 200, onFinish: function onFinish() { tween(basket, { scaleX: 1, scaleY: 1 }, { duration: 200 }); } }); } else { // Wrong color - game over consecutiveMatches = 0; // Save final game time if (sessionStartTime > 0) { var sessionTime = Math.floor((Date.now() - sessionStartTime) / 1000); totalGameTime = (storage.totalGameTime || 0) + sessionTime; storage.totalGameTime = totalGameTime; sessionStartTime = 0; // Reset session start time } // Save high score if current score is higher if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; } LK.getSound('miss').play(); var screenEffectsEnabled = storage.screenEffectsEnabled !== undefined ? storage.screenEffectsEnabled : true; if (screenEffectsEnabled) { LK.effects.flashScreen(0xff0000, 500); } LK.showGameOver(); return; } shape.destroy(); fallingShapes.splice(i, 1); caught = true; break; } } // Remove shapes that went too far down without being caught if (!caught && shape.y > 2800) { shape.destroy(); fallingShapes.splice(i, 1); } } }; function showLevelComplete() { gameState = 'levelcomplete'; // Save final game time if (sessionStartTime > 0) { var sessionTime = Math.floor((Date.now() - sessionStartTime) / 1000); totalGameTime = (storage.totalGameTime || 0) + sessionTime; storage.totalGameTime = totalGameTime; sessionStartTime = 0; } // Save high score if current score is higher if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; } // Save current level progress currentLevel++; storage.currentLevel = currentLevel; levelCompleted = true; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Level complete title with animation var completeTitle = new Text2('BÖLÜM ' + (currentLevel - 1) + ' TAMAMLANDI!', { size: 90, fill: 0x27ae60 }); completeTitle.anchor.set(0.5, 0.5); completeTitle.x = 2048 / 2; completeTitle.y = 600; currentMenu.addChild(completeTitle); // Animate title with celebration effect tween(completeTitle, { scaleX: 1.2, scaleY: 1.2, tint: 0xf1c40f }, { duration: 500, easing: tween.bounceOut, onFinish: function onFinish() { tween(completeTitle, { scaleX: 1, scaleY: 1, tint: 0x27ae60 }, { duration: 300, easing: tween.easeOut }); } }); // Score section var scoreTitle = new Text2('KAZANDIĞINIZ PUAN', { size: 60, fill: 0xf1c40f }); scoreTitle.anchor.set(0.5, 0.5); scoreTitle.x = 2048 / 2; scoreTitle.y = 900; currentMenu.addChild(scoreTitle); var scoreValue = new Text2(LK.getScore().toString(), { size: 100, fill: 0xFFFFFF }); scoreValue.anchor.set(0.5, 0.5); scoreValue.x = 2048 / 2; scoreValue.y = 1020; currentMenu.addChild(scoreValue); // Next level preview var nextLevelTitle = new Text2('BÖLÜM ' + currentLevel + ' HAZIR!', { size: 70, fill: 0x3498db }); nextLevelTitle.anchor.set(0.5, 0.5); nextLevelTitle.x = 2048 / 2; nextLevelTitle.y = 1250; currentMenu.addChild(nextLevelTitle); var nextLevelDesc = new Text2('Yeni bölümde daha hızlı şekiller\nve daha zorlu hedefler sizi bekliyor!', { size: 50, fill: 0xecf0f1 }); nextLevelDesc.anchor.set(0.5, 0.5); nextLevelDesc.x = 2048 / 2; nextLevelDesc.y = 1400; currentMenu.addChild(nextLevelDesc); // Progress celebration var progressText = new Text2('🎉 TEBRİKLER! 🎉\nYeni seviyeye ulaştınız!', { size: 55, fill: 0xff6b6b }); progressText.anchor.set(0.5, 0.5); progressText.x = 2048 / 2; progressText.y = 1600; currentMenu.addChild(progressText); // Buttons var nextLevelButton = new MenuButton('BÖLÜM ' + currentLevel + '\'E GEÇE', 0x27ae60); nextLevelButton.x = 2048 / 2; nextLevelButton.y = 1850; nextLevelButton.onClick = function () { LK.getSound('Click').play(); startNextLevel(); }; currentMenu.addChild(nextLevelButton); var menuButton = new MenuButton('ANA MENÜYE DÖN', 0x34495e); menuButton.x = 2048 / 2; menuButton.y = 2050; menuButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(menuButton); // Play celebration sound LK.getSound('Applause').play(); } function startNextLevel() { // Reset ball collection for new level ballsCollected.red = 0; ballsCollected.blue = 0; ballsCollected.yellow = 0; storage.redBallsCollected = 0; storage.blueBallsCollected = 0; storage.yellowBallsCollected = 0; // Set requirements based on level - level 2 is final level with 10 balls each if (currentLevel === 2) { ballRequirements.red = 10; ballRequirements.blue = 10; ballRequirements.yellow = 10; } else { ballRequirements.red = 5 + currentLevel; ballRequirements.blue = 5 + currentLevel; ballRequirements.yellow = 5 + currentLevel; } levelCompleted = false; startGame(); } function showPremiumStore() { gameState = 'premiumstore'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Store title with luxury styling var storeTitle = new Text2('🛍️ PREMİUM MAĞAZA', { size: 90, fill: 0xd63384 }); storeTitle.anchor.set(0.5, 0.5); storeTitle.x = 2048 / 2; storeTitle.y = 400; currentMenu.addChild(storeTitle); // Animate title with store colors var titleColors = [0xd63384, 0xf39c12, 0x3498db, 0x27ae60]; var currentColorIndex = 0; function animateStoreTitle() { currentColorIndex = (currentColorIndex + 1) % titleColors.length; tween(storeTitle, { tint: titleColors[currentColorIndex], scaleX: 1.1, scaleY: 1.1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(storeTitle, { scaleX: 1, scaleY: 1 }, { duration: 400, onFinish: animateStoreTitle }); } }); } animateStoreTitle(); // Currency display var coinsOwned = storage.premiumCoins || 0; var currencyDisplay = new Text2('💰 Premium Coin: ' + coinsOwned, { size: 50, fill: 0xf1c40f }); currencyDisplay.anchor.set(0.5, 0.5); currencyDisplay.x = 2048 / 2; currencyDisplay.y = 550; currentMenu.addChild(currencyDisplay); // Store categories var categoriesTitle = new Text2('🏪 MAĞAZA KATEGORİLERİ', { size: 60, fill: 0x3498db }); categoriesTitle.anchor.set(0.5, 0.5); categoriesTitle.x = 2048 / 2; categoriesTitle.y = 700; currentMenu.addChild(categoriesTitle); // Item 1: Extra Lives var item1Button = new MenuButton('❤️ Ekstra Can (x5) - 50 Coin', storage.extraLives ? 0x27ae60 : 0xe74c3c); item1Button.x = 2048 / 2; item1Button.y = 900; item1Button.onClick = function () { LK.getSound('Click').play(); if (!storage.extraLives && coinsOwned >= 50) { storage.premiumCoins = coinsOwned - 50; storage.extraLives = true; LK.effects.flashScreen(0x27ae60, 500); showPremiumStore(); // Refresh store } }; currentMenu.addChild(item1Button); // Item 2: Double XP Boost var item2Button = new MenuButton('⚡ Çift XP Artırıcı - 75 Coin', storage.doubleXP ? 0x27ae60 : 0xf39c12); item2Button.x = 2048 / 2; item2Button.y = 1050; item2Button.onClick = function () { LK.getSound('Click').play(); if (!storage.doubleXP && coinsOwned >= 75) { storage.premiumCoins = coinsOwned - 75; storage.doubleXP = true; LK.effects.flashScreen(0xf39c12, 500); showPremiumStore(); // Refresh store } }; currentMenu.addChild(item2Button); // Item 3: Premium Themes var item3Button = new MenuButton('🎨 Premium Temalar - 100 Coin', storage.premiumThemes ? 0x27ae60 : 0x9b59b6); item3Button.x = 2048 / 2; item3Button.y = 1200; item3Button.onClick = function () { LK.getSound('Click').play(); if (!storage.premiumThemes && coinsOwned >= 100) { storage.premiumCoins = coinsOwned - 100; storage.premiumThemes = true; LK.effects.flashScreen(0x9b59b6, 500); showPremiumStore(); // Refresh store } }; currentMenu.addChild(item3Button); // Item 4: Exclusive Shapes var item4Button = new MenuButton('💎 Özel Şekiller - 125 Coin', storage.exclusiveShapes ? 0x27ae60 : 0x1abc9c); item4Button.x = 2048 / 2; item4Button.y = 1350; item4Button.onClick = function () { LK.getSound('Click').play(); if (!storage.exclusiveShapes && coinsOwned >= 125) { storage.premiumCoins = coinsOwned - 125; storage.exclusiveShapes = true; LK.effects.flashScreen(0x1abc9c, 500); showPremiumStore(); // Refresh store } }; currentMenu.addChild(item4Button); // Coin purchase section var coinPurchaseTitle = new Text2('💰 COİN SATIN AL', { size: 60, fill: 0xf1c40f }); coinPurchaseTitle.anchor.set(0.5, 0.5); coinPurchaseTitle.x = 2048 / 2; coinPurchaseTitle.y = 1550; currentMenu.addChild(coinPurchaseTitle); // Coin pack 1 var coinPack1 = new MenuButton('💰 100 Coin - ₺9.99', 0xf39c12); coinPack1.x = 2048 / 2; coinPack1.y = 1700; coinPack1.onClick = function () { LK.getSound('Click').play(); // Simulate purchase storage.premiumCoins = (storage.premiumCoins || 0) + 100; LK.effects.flashScreen(0xf1c40f, 500); showPremiumStore(); // Refresh store }; currentMenu.addChild(coinPack1); // Coin pack 2 var coinPack2 = new MenuButton('💰 250 Coin - ₺19.99 (En Popüler)', 0xe67e22); coinPack2.x = 2048 / 2; coinPack2.y = 1850; coinPack2.onClick = function () { LK.getSound('Click').play(); // Simulate purchase storage.premiumCoins = (storage.premiumCoins || 0) + 250; LK.effects.flashScreen(0xf1c40f, 500); showPremiumStore(); // Refresh store }; currentMenu.addChild(coinPack2); // Special offers section var offersTitle = new Text2('🎁 ÖZEL TEKLIFLER', { size: 60, fill: 0xe74c3c }); offersTitle.anchor.set(0.5, 0.5); offersTitle.x = 2048 / 2; offersTitle.y = 2050; currentMenu.addChild(offersTitle); var dailyOffer = new Text2('🌟 Günlük Teklif: %50 İndirim!\n💰 500 Coin - ₺29.99 (Normal: ₺59.98)', { size: 45, fill: 0xFFFFFF }); dailyOffer.anchor.set(0.5, 0.5); dailyOffer.x = 2048 / 2; dailyOffer.y = 2200; currentMenu.addChild(dailyOffer); // Daily offer button var dailyOfferButton = new MenuButton('🎁 Günlük Teklifi Al', 0xe74c3c); dailyOfferButton.x = 2048 / 2; dailyOfferButton.y = 2350; dailyOfferButton.onClick = function () { LK.getSound('Click').play(); // Simulate purchase storage.premiumCoins = (storage.premiumCoins || 0) + 500; LK.effects.flashScreen(0xe74c3c, 500); showPremiumStore(); // Refresh store }; currentMenu.addChild(dailyOfferButton); // Back button var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2500; backButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(backButton); } function showPremium() { gameState = 'premium'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Premium title with luxury styling var premiumTitle = new Text2('💎 PREMİUM GEÇİŞ', { size: 90, fill: 0xf1c40f }); premiumTitle.anchor.set(0.5, 0.5); premiumTitle.x = 2048 / 2; premiumTitle.y = 400; currentMenu.addChild(premiumTitle); // Animate title with gold effect var titleColors = [0xf1c40f, 0xfeca57, 0xff9500, 0xe67e22]; var currentColorIndex = 0; function animatePremiumTitle() { currentColorIndex = (currentColorIndex + 1) % titleColors.length; tween(premiumTitle, { tint: titleColors[currentColorIndex], scaleX: 1.1, scaleY: 1.1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { tween(premiumTitle, { scaleX: 1, scaleY: 1 }, { duration: 400, onFinish: animatePremiumTitle }); } }); } animatePremiumTitle(); // Premium benefits section var benefitsTitle = new Text2('🌟 PREMİUM AVANTAJLARI', { size: 60, fill: 0x27ae60 }); benefitsTitle.anchor.set(0.5, 0.5); benefitsTitle.x = 2048 / 2; benefitsTitle.y = 600; currentMenu.addChild(benefitsTitle); var benefitsList = new Text2('• ✨ Reklamsız oyun deneyimi\n• 🎵 Premium müzik koleksiyonu\n• 🎨 Özel sepet tasarımları\n• ⚡ Ekstra güç artırıcılar\n• 🏆 Premium liderlik tablosu\n• 🎁 Günlük bonus ödüller\n• 🎪 Özel oyun modları\n• ☁️ Bulut kayıt sistemi', { size: 45, fill: 0xFFFFFF }); benefitsList.anchor.set(0.5, 0.5); benefitsList.x = 2048 / 2; benefitsList.y = 850; currentMenu.addChild(benefitsList); // Pricing section var pricingTitle = new Text2('💰 FİYATLANDIRMA', { size: 60, fill: 0x3498db }); pricingTitle.anchor.set(0.5, 0.5); pricingTitle.x = 2048 / 2; pricingTitle.y = 1150; currentMenu.addChild(pricingTitle); // Check if user has premium status var hasPremium = storage.hasPremium || false; if (hasPremium) { var premiumStatus = new Text2('✅ Premium üyeliğiniz aktif!\nTüm özelliklerden faydalanabilirsiniz.', { size: 50, fill: 0x27ae60 }); premiumStatus.anchor.set(0.5, 0.5); premiumStatus.x = 2048 / 2; premiumStatus.y = 1300; currentMenu.addChild(premiumStatus); } else { var pricingOptions = new Text2('📅 Aylık: ₺9.99 - İlk ay ücretsiz!\n📊 3 Aylık: ₺24.99 - %17 indirim\n🎯 Yıllık: ₺79.99 - %33 indirim\n💎 Yaşam Boyu: ₺199.99 - Tek ödeme', { size: 45, fill: 0xecf0f1 }); pricingOptions.anchor.set(0.5, 0.5); pricingOptions.x = 2048 / 2; pricingOptions.y = 1350; currentMenu.addChild(pricingOptions); // Promotional banner var promoText = new Text2('🎉 ÖZEL KAMPANYA: İlk ay tamamen ücretsiz!', { size: 50, fill: 0xff6b6b }); promoText.anchor.set(0.5, 0.5); promoText.x = 2048 / 2; promoText.y = 1550; currentMenu.addChild(promoText); // Animate promo text tween(promoText, { scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(promoText, { scaleX: 1, scaleY: 1 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { if (gameState === 'premium') { tween(promoText, { scaleX: 1.1, scaleY: 1.1 }, { duration: 1000, easing: tween.easeInOut }); } } }); } }); // Purchase button var purchaseButton = new MenuButton('🛒 PREMİUM SATIN AL', 0x27ae60); purchaseButton.x = 2048 / 2; purchaseButton.y = 1750; purchaseButton.onClick = function () { LK.getSound('Click').play(); // Simulate purchase process storage.hasPremium = true; LK.effects.flashScreen(0xf1c40f, 1000); // Refresh premium screen to show activated status showPremium(); }; currentMenu.addChild(purchaseButton); } // Testimonials section var testimonialsTitle = new Text2('💬 KULLANICI YORUMLARI', { size: 60, fill: 0x9b59b6 }); testimonialsTitle.anchor.set(0.5, 0.5); testimonialsTitle.x = 2048 / 2; testimonialsTitle.y = hasPremium ? 1500 : 1950; currentMenu.addChild(testimonialsTitle); var testimonials = new Text2('⭐⭐⭐⭐⭐ "Premium ile oyun çok daha eğlenceli!" - Ayşe\n⭐⭐⭐⭐⭐ "Reklamsız deneyim harika!" - Mehmet\n⭐⭐⭐⭐⭐ "Özel tasarımlar çok güzel!" - Fatma', { size: 40, fill: 0xbdc3c7 }); testimonials.anchor.set(0.5, 0.5); testimonials.x = 2048 / 2; testimonials.y = hasPremium ? 1650 : 2100; currentMenu.addChild(testimonials); // Back button var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = hasPremium ? 1850 : 2300; backButton.onClick = function () { LK.getSound('Click').play(); createMainMenu(); }; currentMenu.addChild(backButton); } function showRecentUpdates() { gameState = 'recentupdates'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var updatesTitle = new Text2('🆕 OYUNA SON EKLENENLER', { size: 80, fill: 0x1abc9c }); updatesTitle.anchor.set(0.5, 0.5); updatesTitle.x = 2048 / 2; updatesTitle.y = 400; currentMenu.addChild(updatesTitle); // Version section var versionTitle = new Text2('📋 GÜNCEL VERSİYON: v1.2', { size: 60, fill: 0xf1c40f }); versionTitle.anchor.set(0.5, 0.5); versionTitle.x = 2048 / 2; versionTitle.y = 600; currentMenu.addChild(versionTitle); // Recent updates section var recentTitle = new Text2('⭐ YENİ ÖZELLİKLER', { size: 60, fill: 0x3498db }); recentTitle.anchor.set(0.5, 0.5); recentTitle.x = 2048 / 2; recentTitle.y = 800; currentMenu.addChild(recentTitle); var recentText = new Text2('• Bölüm sistemi eklendi (2 bölüm)\n• İstatistiklerim menüsü eklendi\n• Toplam oyun süresi takibi\n• Başarım sistemi geliştirildi\n• Ayarlar menüsü genişletildi\n• Ses efektleri iyileştirildi', { size: 45, fill: 0xFFFFFF }); recentText.anchor.set(0.5, 0.5); recentText.x = 2048 / 2; recentText.y = 980; currentMenu.addChild(recentText); // Improvements section var improvementsTitle = new Text2('🔧 İYİLEŞTİRMELER', { size: 60, fill: 0x27ae60 }); improvementsTitle.anchor.set(0.5, 0.5); improvementsTitle.x = 2048 / 2; improvementsTitle.y = 1200; currentMenu.addChild(improvementsTitle); var improvementsText = new Text2('• Oyun performansı optimize edildi\n• Menü geçişleri daha akıcı hale getirildi\n• Renk körü modu için hazırlık yapıldı\n• Dokunmatik kontroller iyileştirildi\n• Arka plan animasyonları güncellendi', { size: 45, fill: 0xecf0f1 }); improvementsText.anchor.set(0.5, 0.5); improvementsText.x = 2048 / 2; improvementsText.y = 1380; currentMenu.addChild(improvementsText); // Coming soon section var comingSoonTitle = new Text2('🚀 YAKINDA GELECEKLER', { size: 60, fill: 0xe67e22 }); comingSoonTitle.anchor.set(0.5, 0.5); comingSoonTitle.x = 2048 / 2; comingSoonTitle.y = 1600; currentMenu.addChild(comingSoonTitle); var comingSoonText = new Text2('• Günlük meydan okumalar\n• Farklı oyun modları\n• Liderlik tablosu\n• Sosyal paylaşım özellikleri\n• Yeni şekil türleri', { size: 45, fill: 0xbdc3c7 }); comingSoonText.anchor.set(0.5, 0.5); comingSoonText.x = 2048 / 2; comingSoonText.y = 1780; currentMenu.addChild(comingSoonText); // Bug fixes section var bugFixesTitle = new Text2('🐛 HATA DÜZELTMELERİ', { size: 60, fill: 0x9b59b6 }); bugFixesTitle.anchor.set(0.5, 0.5); bugFixesTitle.x = 2048 / 2; bugFixesTitle.y = 2000; currentMenu.addChild(bugFixesTitle); var bugFixesText = new Text2('• Oyun süresi hesaplama hatası düzeltildi\n• Sepet sürükleme hassasiyeti artırıldı\n• Menü butonları daha responsive\n• Müzik ayarları kaydetme sorunu çözüldü', { size: 45, fill: 0x95a5a6 }); bugFixesText.anchor.set(0.5, 0.5); bugFixesText.x = 2048 / 2; bugFixesText.y = 2140; currentMenu.addChild(bugFixesText); // Feature requests section var requestTitle = new Text2('💡 OYUNA GELMESİNİ İSTEDİKLERİNİZ', { size: 60, fill: 0xff6b6b }); requestTitle.anchor.set(0.5, 0.5); requestTitle.x = 2048 / 2; requestTitle.y = 2320; currentMenu.addChild(requestTitle); var requestText = new Text2('• Power-up özellikler (Slow Motion, Extra Points)\n• Farklı şekil türleri (Yıldız, Kalp, Üçgen)\n• Sezonluk temalar (Kış, Yaz, Bahar)\n• Çok oyunculu mod\n• Günlük görevler ve ödüller\n• Özelleştirilebilir sepet tasarımları', { size: 45, fill: 0xFFFFFF }); requestText.anchor.set(0.5, 0.5); requestText.x = 2048 / 2; requestText.y = 2500; currentMenu.addChild(requestText); // Add request submission info var submitInfo = new Text2('Sizin de eklemek istediğiniz özellikler var mı?\nFRVR platform üzerinden bize yazabilirsiniz!', { size: 40, fill: 0xbdc3c7 }); submitInfo.anchor.set(0.5, 0.5); submitInfo.x = 2048 / 2; submitInfo.y = 2730; currentMenu.addChild(submitInfo); // Back button var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e); backButton.x = 350; // Position on left side instead of center backButton.y = 1366; // Middle of screen height (2732/2) // Add subtle animation to the back button tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(backButton, { alpha: 1 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { // Repeat animation if (gameState === 'recentupdates') { tween(backButton, { alpha: 0.8 }, { duration: 1500, easing: tween.easeInOut }); } } }); } }); backButton.onClick = function () { LK.getSound('Click').play(); // Add visual feedback on click tween(backButton.bg, { tint: 0x2c3e50 }, { duration: 100, onFinish: function onFinish() { tween(backButton.bg, { tint: 0x34495e }, { duration: 100 }); } }); createMainMenu(); }; currentMenu.addChild(backButton); } function showPrivacyPolicy() { gameState = 'privacypolicy'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var titleText = new Text2('📄 GİZLİLİK POLİTİKASI', { size: 70, fill: 0x3498db }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 400; currentMenu.addChild(titleText); // Privacy policy content var privacyContent = new Text2('VERİ TOPLAMA VE KULLANIMI\n\n' + '• Oyun deneyiminizi geliştirmek için minimum veri toplarız\n' + '• Kişisel bilgileriniz üçüncü taraflarla paylaşılmaz\n' + '• Oyun ilerlemesi cihazınızda yerel olarak saklanır\n' + '• İstatistikler anonim olarak işlenir\n\n' + 'VERİ GÜVENLİĞİ\n\n' + '• Tüm veriler şifreleme ile korunur\n' + '• Güvenli bağlantı protokolleri kullanılır\n' + '• Düzenli güvenlik güncellemeleri yapılır\n\n' + 'HAKLARINIZ\n\n' + '• Verilerinizi silme hakkınız vardır\n' + '• Veri kullanımı hakkında bilgi alma hakkınız vardır\n' + '• Bu politika değişikliklerinden haberdar edileceksiniz', { size: 40, fill: 0xFFFFFF }); privacyContent.anchor.set(0.5, 0.5); privacyContent.x = 2048 / 2; privacyContent.y = 1200; currentMenu.addChild(privacyContent); // Last updated var lastUpdated = new Text2('Son Güncelleme: 2024', { size: 35, fill: 0x95a5a6 }); lastUpdated.anchor.set(0.5, 0.5); lastUpdated.x = 2048 / 2; lastUpdated.y = 2000; currentMenu.addChild(lastUpdated); // Back button var backButton = new MenuButton('⬅ GERİ DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2200; backButton.onClick = function () { LK.getSound('Click').play(); createLoginScreen(); }; currentMenu.addChild(backButton); } function showTermsOfService() { gameState = 'termsofservice'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var titleText = new Text2('📋 KULLANIM ŞARTLARI', { size: 70, fill: 0x9b59b6 }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 400; currentMenu.addChild(titleText); // Terms content var termsContent = new Text2('GENEL ŞARTLAR\n\n' + '• Bu oyunu kullanarak şartları kabul etmiş sayılırsınız\n' + '• Oyun 13 yaş ve üzeri kullanıcılar içindir\n' + '• Haksız kazanç elde etmeye yönelik eylemler yasaktır\n' + '• Oyun içi satın almalar iade edilemez\n\n' + 'KULLANICI SORUMLULUKLARI\n\n' + '• Oyunu adil bir şekilde oynamak\n' + '• Diğer oyunculara saygılı davranmak\n' + '• Oyun kurallarına uymak\n' + '• Teknik sorunları bildirmek\n\n' + 'HİZMET KOŞULLARI\n\n' + '• Oyun hizmeti "olduğu gibi" sunulmaktadır\n' + '• Teknik bakım dönemlerinde kesinti olabilir\n' + '• Bu şartlar önceden haber verilmeksizin değişebilir', { size: 40, fill: 0xFFFFFF }); termsContent.anchor.set(0.5, 0.5); termsContent.x = 2048 / 2; termsContent.y = 1200; currentMenu.addChild(termsContent); // Acceptance notice var acceptanceNotice = new Text2('Bu oyunu oynayarak yukarıdaki şartları kabul etmiş sayılırsınız.', { size: 35, fill: 0xf39c12 }); acceptanceNotice.anchor.set(0.5, 0.5); acceptanceNotice.x = 2048 / 2; acceptanceNotice.y = 2000; currentMenu.addChild(acceptanceNotice); // Back button var backButton = new MenuButton('⬅ GERİ DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2200; backButton.onClick = function () { LK.getSound('Click').play(); createLoginScreen(); }; currentMenu.addChild(backButton); } // Function to show friend invitation screen function showFriendInvitation() { gameState = 'friendinvitation'; // Clear existing menu if (currentMenu) { currentMenu.destroy(); } currentMenu = new Container(); game.addChild(currentMenu); // Title var titleText = new Text2('👥 ARKADAŞLARI DAVET ET', { size: 80, fill: 0x27ae60 }); titleText.anchor.set(0.5, 0.5); titleText.x = 2048 / 2; titleText.y = 500; currentMenu.addChild(titleText); // Invitation benefits var benefitsTitle = new Text2('🎁 DAVET AVANTAJLARI', { size: 60, fill: 0xf1c40f }); benefitsTitle.anchor.set(0.5, 0.5); benefitsTitle.x = 2048 / 2; benefitsTitle.y = 700; currentMenu.addChild(benefitsTitle); var benefitsList = new Text2('• Her arkadaş daveti için 50 bonus puan!\n• Arkadaşınız da 50 bonus puan kazanır\n• Beraber oynadığınızda çift XP\n• Özel arkadaş liderlik tablosu\n• Arkadaş meydan okumaları', { size: 45, fill: 0xFFFFFF }); benefitsList.anchor.set(0.5, 0.5); benefitsList.x = 2048 / 2; benefitsList.y = 850; currentMenu.addChild(benefitsList); // Your invitation code section var codeTitle = new Text2('📋 SİZİN DAVET KODUNUZ', { size: 60, fill: 0x3498db }); codeTitle.anchor.set(0.5, 0.5); codeTitle.x = 2048 / 2; codeTitle.y = 1100; currentMenu.addChild(codeTitle); // Generate or get stored invitation code var invitationCode = storage.invitationCode || 'CATCH' + Math.floor(Math.random() * 10000); storage.invitationCode = invitationCode; var codeDisplay = new Text2(invitationCode, { size: 100, fill: 0xf1c40f }); codeDisplay.anchor.set(0.5, 0.5); codeDisplay.x = 2048 / 2; codeDisplay.y = 1200; currentMenu.addChild(codeDisplay); // Copy code button var copyButton = new MenuButton('📋 KODU KOPYALA', 0x27ae60); copyButton.x = 2048 / 2; copyButton.y = 1350; copyButton.onClick = function () { LK.getSound('Click').play(); // Simulate copying to clipboard LK.effects.flashScreen(0x27ae60, 300); // Show feedback var copyFeedback = new Text2('✅ Kod kopyalandı!', { size: 50, fill: 0x27ae60 }); copyFeedback.anchor.set(0.5, 0.5); copyFeedback.x = 2048 / 2; copyFeedback.y = 1450; currentMenu.addChild(copyFeedback); // Auto remove feedback after 2 seconds LK.setTimeout(function () { if (copyFeedback.parent) { copyFeedback.destroy(); } }, 2000); }; currentMenu.addChild(copyButton); // Share buttons section var shareTitle = new Text2('📤 ARKADAŞLARINIZLA PAYLAŞIN', { size: 60, fill: 0x9b59b6 }); shareTitle.anchor.set(0.5, 0.5); shareTitle.x = 2048 / 2; shareTitle.y = 1550; currentMenu.addChild(shareTitle); // WhatsApp share button var whatsappButton = new MenuButton('📱 WhatsApp ile Paylaş', 0x25D366); whatsappButton.x = 2048 / 3; whatsappButton.y = 1700; whatsappButton.onClick = function () { LK.getSound('Click').play(); LK.effects.flashScreen(0x25D366, 300); }; currentMenu.addChild(whatsappButton); // SMS share button var smsButton = new MenuButton('💬 SMS ile Paylaş', 0x34495e); smsButton.x = 2048 * 2 / 3; smsButton.y = 1700; smsButton.onClick = function () { LK.getSound('Click').play(); LK.effects.flashScreen(0x34495e, 300); }; currentMenu.addChild(smsButton); // Enter friend code section var enterCodeTitle = new Text2('🔑 ARKADAŞ KODU GİRİN', { size: 60, fill: 0xe67e22 }); enterCodeTitle.anchor.set(0.5, 0.5); enterCodeTitle.x = 2048 / 2; enterCodeTitle.y = 1900; currentMenu.addChild(enterCodeTitle); var enterCodeInfo = new Text2('Arkadaşınızın davet kodunu girerek\nikiniz de bonus puan kazanabilirsiniz!', { size: 45, fill: 0xbdc3c7 }); enterCodeInfo.anchor.set(0.5, 0.5); enterCodeInfo.x = 2048 / 2; enterCodeInfo.y = 2020; currentMenu.addChild(enterCodeInfo); var enterCodeButton = new MenuButton('⌨️ KOD GİR', 0xe67e22); enterCodeButton.x = 2048 / 2; enterCodeButton.y = 2150; enterCodeButton.onClick = function () { LK.getSound('Click').play(); // Simulate code entry process var enteredCode = 'CATCH' + Math.floor(Math.random() * 10000); if (enteredCode !== invitationCode) { // Simulate successful code entry storage.friendCodesUsed = (storage.friendCodesUsed || 0) + 1; LK.setScore(LK.getScore() + 50); LK.effects.flashScreen(0x27ae60, 500); // Show success message var successMsg = new Text2('🎉 Kod kabul edildi! +50 puan kazandınız!', { size: 50, fill: 0x27ae60 }); successMsg.anchor.set(0.5, 0.5); successMsg.x = 2048 / 2; successMsg.y = 2300; currentMenu.addChild(successMsg); } }; currentMenu.addChild(enterCodeButton); // Statistics var statsTitle = new Text2('📊 DAVET İSTATİSTİKLERİNİZ', { size: 50, fill: 0x6c5ce7 }); statsTitle.anchor.set(0.5, 0.5); statsTitle.x = 2048 / 2; statsTitle.y = 2400; currentMenu.addChild(statsTitle); var friendStats = storage.friendsInvited || 0; var codeStats = storage.friendCodesUsed || 0; var statsDisplay = new Text2('Davet ettiğiniz arkadaş: ' + friendStats + '\nKullandığınız kod: ' + codeStats, { size: 45, fill: 0xFFFFFF }); statsDisplay.anchor.set(0.5, 0.5); statsDisplay.x = 2048 / 2; statsDisplay.y = 2500; currentMenu.addChild(statsDisplay); // Back button var backButton = new MenuButton('⬅ GERİ DÖN', 0x34495e); backButton.x = 2048 / 2; backButton.y = 2650; backButton.onClick = function () { LK.getSound('Click').play(); createLoginScreen(); }; currentMenu.addChild(backButton); }
===================================================================
--- original.js
+++ change.js
@@ -2091,51 +2091,29 @@
specialEventsNotification.anchor.set(0.5, 0.5);
specialEventsNotification.x = 2048 / 2;
specialEventsNotification.y = 100; // Position at very top of main menu
currentMenu.addChild(specialEventsNotification);
- // Animate special events notification with festive colors
- var eventColors = [0xff6b6b, 0xf1c40f, 0x27ae60, 0x3498db, 0x9b59b6]; // Red, Yellow, Green, Blue, Purple
- var currentEventColorIndex = 0;
- function animateSpecialEvents() {
- currentEventColorIndex = (currentEventColorIndex + 1) % eventColors.length;
- tween(specialEventsNotification, {
- tint: eventColors[currentEventColorIndex],
- scaleX: 1.05,
- scaleY: 1.05
- }, {
- duration: 600,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- tween(specialEventsNotification, {
- scaleX: 1,
- scaleY: 1
- }, {
- duration: 400,
- onFinish: animateSpecialEvents
- });
- }
- });
- }
- // Blinking effect for urgency
+ // Red blinking effect for New Year bonus
function blinkSpecialEvents() {
tween(specialEventsNotification, {
+ tint: 0xff0000,
alpha: 0.3
}, {
- duration: 800,
+ duration: 400,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(specialEventsNotification, {
+ tint: 0xff6b6b,
alpha: 1
}, {
- duration: 800,
+ duration: 400,
easing: tween.easeInOut,
onFinish: blinkSpecialEvents
});
}
});
}
- // Start animations
- animateSpecialEvents();
+ // Start red blinking animation
blinkSpecialEvents();
// Copyright text
var copyrightText = new Text2('© 2024 FRVR - Tüm hakları saklıdır', {
size: 35,
Make me a 2d basketball hoop net in yellow color. In-Game asset. 2d. High contrast. No shadows
Bana 2d basketbol topu yap sarı renkli olsun. In-Game asset. 2d. High contrast. No shadows
Make me a 2d basketball hoop net in blue color. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows
Bana 2d basketbol topu yap mavi renk olsun. In-Game asset. 2d. High contrast. No shadows
Bana 2d basketbol topu yap kırmızı renk olsun. In-Game asset. 2d. High contrast. No shadows
Make me a 2d basketball hoop net in red color. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows
600x120 size box, Oyunu başlat text yazısı. In-Game asset. 2d. High contrast. No shadows
Bana 2d basketbol topuyap gökkuşağı renklerinde olsun. In-Game asset. 2d. High contrast. No shadows