User prompt
Nasıl oynanır kısmını güncelle. Oyuna son eklenenler kısmını güncelle
User prompt
Oyun bölüm 1den başlasın. ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Bölüm2 ye geçince game over olmasın. Bölüm 2 son bölüm olsun burada hedef 10 olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Hedef kısmında ki Kırmızı yazı textini rengini kırmızı renk ile yaz maviyi mavi renk sarıyı sarı renk
User prompt
Hedef kısmı bölüm yazıları sol üstde değil de sağ üst de olmasını istiyorum
User prompt
Hedefi tamamladığımız zaman hepsini. Bölüm 1 tamamlandı bölüm2 ekranı olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1, @upit/tween.v1
User prompt
Oyun içinde toplamam gereken top sayıları belirt örneğin sarı toptan 5 kırmızı top 5 mavi top 5 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Topların yukarıdan gelislerini daha güzel animasyonlu yapar mısın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ödül sistemi ekle ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Örneğin redbasket assetsine alev efekti verebilir miyiz? Animasyonu ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Add ball assets bu top 3 fileden de geçebilsin ve 5 saniye sonra gelmeye başlasin 1 kereliğine sonra 20 saniye sonra 1 kere sonra bir daha gelmesin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Bana diğer basketboltoplarindan bir tane daha ekle rengi yeşil olsun
User prompt
Öneri gönder yazısının textini sil
User prompt
OYUNA son eklenenler kısmına oyuna gelmesini istediğiniz özellikleri yazmak için bir kısım oluştur ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught ReferenceError: improvements is not defined' in or related to this line: 'improvements.anchor.set(0.5, 0.5);' Line Number: 1168
User prompt
YAPIMCILAR BUTONUnun altına OYUNA SON EKLENENLER butonu ekle
User prompt
Toplam oyun süresini daha özenli yap çok yanlış gösteriyo ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught ReferenceError: formatGameTime is not defined' in or related to this line: 'var gameTimeValue = new Text2(formatGameTime(currentTotalTime), {' Line Number: 734
User prompt
Please fix the bug: 'Uncaught ReferenceError: formatGameTime is not defined' in or related to this line: 'var gameTimeValue = new Text2(formatGameTime(currentTotalTime), {' Line Number: 747
User prompt
Oyun başlama ekranında yeni bir buton ekle buton adı İstatistiklerim olsun ve en yüksek skor ve oyunda toplam süremi oraya yaz ana ekrandan bu yazıları sil ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Toplam oyun süresi ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Nasıl oynanır menüsünde ki geri butonunuda daha özenli yap
User prompt
Ayarlar butonunda ki geri butonunu da daha özenli yap
User prompt
Yapımcılar kısmını da daha özenli yapar mısın
User prompt
renkli topları yakalama textini RENKLİ TOPLARI YAKALAMA OYUNU yazısını değiştir
/****
* 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
});
/****
* 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;
});
/****
* 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';
}
}
var baskets = [];
var fallingShapes = [];
// 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 = storage.currentLevel || 1;
var levelCompleted = false;
// 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 gradient layers
var gradientLayer1 = LK.getAsset('gradientLayer1', {
anchorX: 0,
anchorY: 0
});
gradientLayer1.x = 0;
gradientLayer1.y = 0;
gradientLayer1.alpha = 0.8;
backgroundContainer.addChild(gradientLayer1);
var gradientLayer2 = LK.getAsset('gradientLayer2', {
anchorX: 0,
anchorY: 0
});
gradientLayer2.x = 0;
gradientLayer2.y = 0;
gradientLayer2.alpha = 0.6;
backgroundContainer.addChild(gradientLayer2);
// Animate gradient layers
function animateGradientLayers() {
tween(gradientLayer1, {
alpha: 0.4
}, {
duration: 3000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(gradientLayer1, {
alpha: 0.8
}, {
duration: 3000,
easing: tween.easeInOut,
onFinish: animateGradientLayers
});
}
});
tween(gradientLayer2, {
alpha: 0.3
}, {
duration: 2500,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(gradientLayer2, {
alpha: 0.6
}, {
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);
// 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
var titleText = new Text2('BÖLÜM ' + currentLevel + ' HEDEF:', {
size: 50,
fill: 0xFFFFFF
});
titleText.anchor.set(1, 0);
titleText.x = 0;
titleText.y = 0;
ballDisplayContainer.addChild(titleText);
// 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);
// Update the global reference to the new container
ballCountTxt = ballDisplayContainer;
}
// Initialize menu system
function createMainMenu() {
gameState = 'menu';
// Hide game UI elements
scoreTxt.visible = false;
ballCountTxt.visible = false;
// Clear existing menu
if (currentMenu) {
currentMenu.destroy();
}
currentMenu = new Container();
game.addChild(currentMenu);
// Game title
var titleText = new Text2('RENKLİ TOPLARI YAKALAMA OYUNU', {
size: 100,
fill: 0xff6b6b
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 2048 / 2;
titleText.y = 600;
currentMenu.addChild(titleText);
// Animate title with color cycling and movement
var titleColors = [0xfeca57, 0xff9500, 0xff69b4, 0x4da6ff]; // Yellow, Orange, Pink, Blue
var currentColorIndex = 0;
function animateTitle() {
// Color cycling animation
currentColorIndex = (currentColorIndex + 1) % titleColors.length;
tween(titleText, {
tint: titleColors[currentColorIndex]
}, {
duration: 1500,
easing: tween.easeInOut,
onFinish: function onFinish() {
animateTitle();
}
});
// Gentle floating movement
var targetY = 600 + Math.sin(Date.now() * 0.001) * 20;
tween(titleText, {
y: targetY,
scaleX: 1.05,
scaleY: 1.05
}, {
duration: 2000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(titleText, {
scaleX: 1,
scaleY: 1
}, {
duration: 2000,
easing: tween.easeInOut
});
}
});
}
// Start the animation
animateTitle();
// Menu buttons
var startButton = new MenuButton('OYUNU BAŞLAT', 0x27ae60);
startButton.x = 2048 / 2;
startButton.y = 1000;
startButton.onClick = function () {
LK.getSound('Click').play();
startGame();
};
currentMenu.addChild(startButton);
var howToPlayButton = new MenuButton('NASIL OYNANIR', 0x3498db);
howToPlayButton.x = 2048 / 2;
howToPlayButton.y = 1200;
howToPlayButton.onClick = function () {
LK.getSound('Click').play();
showHowToPlay();
};
currentMenu.addChild(howToPlayButton);
var statisticsButton = new MenuButton('İSTATİSTİKLERİM', 0x6c5ce7);
statisticsButton.x = 2048 / 2;
statisticsButton.y = 1350;
statisticsButton.onClick = function () {
LK.getSound('Click').play();
showStatistics();
};
currentMenu.addChild(statisticsButton);
var settingsButton = new MenuButton('AYARLAR', 0xf39c12);
settingsButton.x = 2048 / 2;
settingsButton.y = 1500;
settingsButton.onClick = function () {
LK.getSound('Click').play();
showSettings();
};
currentMenu.addChild(settingsButton);
var creatorsButton = new MenuButton('YAPIMCILAR', 0x9b59b6);
creatorsButton.x = 2048 / 2;
creatorsButton.y = 1650;
creatorsButton.onClick = function () {
LK.getSound('Click').play();
showCreators();
};
currentMenu.addChild(creatorsButton);
var recentUpdatesButton = new MenuButton('OYUNA SON EKLENENLER', 0x1abc9c);
recentUpdatesButton.x = 2048 / 2;
recentUpdatesButton.y = 1800;
recentUpdatesButton.onClick = function () {
LK.getSound('Click').play();
showRecentUpdates();
};
currentMenu.addChild(recentUpdatesButton);
var exitButton = new MenuButton('ÇIKIŞ', 0xe74c3c);
exitButton.x = 2048 / 2;
exitButton.y = 1950;
exitButton.onClick = function () {
LK.getSound('Click').play();
// On mobile, we can't actually exit, so show a message
LK.effects.flashScreen(0x000000, 1000);
};
currentMenu.addChild(exitButton);
}
function startGame() {
gameState = 'playing';
// Clear menu
if (currentMenu) {
currentMenu.destroy();
currentMenu = null;
}
// Show score and ball collection display
scoreTxt.visible = true;
ballCountTxt.visible = true;
updateBallDisplay();
// 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 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;
}
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 = 600;
currentMenu.addChild(objectiveText);
var objectiveDesc = new Text2('Yukarıdan düşen renkli şekilleri\naynı renkteki sepetlerle yakalayın!', {
size: 45,
fill: 0xFFFFFF
});
objectiveDesc.anchor.set(0.5, 0.5);
objectiveDesc.x = 2048 / 2;
objectiveDesc.y = 720;
currentMenu.addChild(objectiveDesc);
// Controls section
var controlsText = new Text2('🎮 KONTROLLER', {
size: 60,
fill: 0x3498db
});
controlsText.anchor.set(0.5, 0.5);
controlsText.x = 2048 / 2;
controlsText.y = 900;
currentMenu.addChild(controlsText);
var controlsDesc = new Text2('• Sepetleri parmağınızla sürükleyerek hareket ettirin\n• Sepetler yatay olarak sola-sağa hareket eder\n• Dokunup sürükleyerek sepeti istediğiniz yere getirin', {
size: 40,
fill: 0xFFFFFF
});
controlsDesc.anchor.set(0.5, 0.5);
controlsDesc.x = 2048 / 2;
controlsDesc.y = 1060;
currentMenu.addChild(controlsDesc);
// Scoring section
var scoringText = new Text2('🏆 PUANLAMA', {
size: 60,
fill: 0x27ae60
});
scoringText.anchor.set(0.5, 0.5);
scoringText.x = 2048 / 2;
scoringText.y = 1280;
currentMenu.addChild(scoringText);
var scoringDesc = new Text2('• Doğru renk yakaladığınızda: +10 puan\n• Ardışık başarılı yakalamalar bonus puan verir\n• Her başarılı yakalama sonraki puanı artırır', {
size: 40,
fill: 0xFFFFFF
});
scoringDesc.anchor.set(0.5, 0.5);
scoringDesc.x = 2048 / 2;
scoringDesc.y = 1400;
currentMenu.addChild(scoringDesc);
// Game over conditions
var gameOverText = new Text2('❌ OYUN BİTİŞ KOŞULLARI', {
size: 60,
fill: 0xe74c3c
});
gameOverText.anchor.set(0.5, 0.5);
gameOverText.x = 2048 / 2;
gameOverText.y = 1580;
currentMenu.addChild(gameOverText);
var gameOverDesc = new Text2('• Yanlış renkteki sepete şekil düşürürseniz\n• Herhangi bir şekli kaçırırsanız (yere düşerse)\n• Dikkat edin: Oyun hızlanarak zorlaşır!', {
size: 40,
fill: 0xFFFFFF
});
gameOverDesc.anchor.set(0.5, 0.5);
gameOverDesc.x = 2048 / 2;
gameOverDesc.y = 1700;
currentMenu.addChild(gameOverDesc);
// Tips section
var tipsText = new Text2('💡 İPUÇLARI', {
size: 60,
fill: 0x9b59b6
});
tipsText.anchor.set(0.5, 0.5);
tipsText.x = 2048 / 2;
tipsText.y = 1880;
currentMenu.addChild(tipsText);
var tipsDesc = new Text2('• Sepetleri önceden konumlandırın\n• Oyun ilerledikçe hızlanacağını unutmayın\n• Ayarlardan zorluk seviyesini değiştirebilirsiniz', {
size: 40,
fill: 0xFFFFFF
});
tipsDesc.anchor.set(0.5, 0.5);
tipsDesc.x = 2048 / 2;
tipsDesc.y = 2000;
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);
// Enhanced back button with improved styling
var backButton = new MenuButton('⬅ ANA MENÜYE DÖN', 0x34495e);
backButton.x = 2048 / 2;
backButton.y = 1800;
// 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);
}
// Initialize main menu
createMainMenu();
// 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;
// Add beautiful entrance animation
// Start with small scale and fade in
shape.scaleX = 0.1;
shape.scaleY = 0.1;
shape.alpha = 0;
// Animate scale with bounce effect
tween(shape, {
scaleX: 1.2,
scaleY: 1.2,
alpha: 1
}, {
duration: 300,
easing: tween.bounceOut,
onFinish: function onFinish() {
tween(shape, {
scaleX: 1,
scaleY: 1
}, {
duration: 200,
easing: tween.easeOut
});
}
});
// Add subtle rotation animation
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)
particleSpawnTimer++;
if (particleSpawnTimer >= 20) {
// Spawn particle every 20 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
if (gameState !== 'playing') {
return;
}
// Spawn shapes
shapeSpawnTimer++;
// Calculate spawn interval based on difficulty
var baseInterval = difficultyLevel === 'Easy' ? 150 : difficultyLevel === 'Hard' ? 90 : 120;
var spawnInterval = Math.max(30, baseInterval - gameSpeed * 10);
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();
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;
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) {
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();
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;
// Increase difficulty for next level
ballRequirements.red = 5 + currentLevel;
ballRequirements.blue = 5 + currentLevel;
ballRequirements.yellow = 5 + currentLevel;
levelCompleted = false;
startGame();
}
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('• İ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 = 2048 / 2;
backButton.y = 2850;
backButton.onClick = function () {
LK.getSound('Click').play();
createMainMenu();
};
currentMenu.addChild(backButton);
} ===================================================================
--- original.js
+++ change.js
@@ -260,13 +260,55 @@
ballCountTxt.visible = false;
LK.gui.topRight.addChild(ballCountTxt);
// Function to update ball collection display
function updateBallDisplay() {
- var displayText = 'BÖLÜM ' + currentLevel + ' HEDEF:\n';
- displayText += 'Kırmızı: ' + ballsCollected.red + '/' + ballRequirements.red + '\n';
- displayText += 'Mavi: ' + ballsCollected.blue + '/' + ballRequirements.blue + '\n';
- displayText += 'Sarı: ' + ballsCollected.yellow + '/' + ballRequirements.yellow;
- ballCountTxt.setText(displayText);
+ // 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
+ var titleText = new Text2('BÖLÜM ' + currentLevel + ' HEDEF:', {
+ size: 50,
+ fill: 0xFFFFFF
+ });
+ titleText.anchor.set(1, 0);
+ titleText.x = 0;
+ titleText.y = 0;
+ ballDisplayContainer.addChild(titleText);
+ // 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);
+ // Update the global reference to the new container
+ ballCountTxt = ballDisplayContainer;
}
// Initialize menu system
function createMainMenu() {
gameState = 'menu';
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