User prompt
Durdurma menüsündeki butonları aseste ekle
User prompt
Ve karşıya üç blok çıkar biri devam etirsin bir başlangıca geri döndürsun biri de ayarları açsın
User prompt
Basınca her şey dursun
User prompt
Durdurma menüsündeki bütün butonları sil
User prompt
Yeni üç buton ekle
User prompt
Basınca her şey dursun ve üç tane buton çıksın arka plan opakligi da %10 Blur ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Scorun altına durdurma tuşu ekle
User prompt
Starta basınca animasyon çalışsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Start bloğuna basınca start bloğu küçülsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Start tuşuna basınca bir animasyon çalışsın blok küçülsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ortaya al
User prompt
X eksenini azalt
User prompt
Biraz daha
User prompt
Biraz daha arttır
User prompt
Bu blokun y boyutunu arttır
User prompt
Aşağıya indir
User prompt
Start ekranının üstüne bir blok daha ekle ve asseste ekle
User prompt
Skor +100 artarsa sepet ve meyve hızını %3 arttır ve bunu her zaman tekrarla
User prompt
Meyve hareket hızını başlangıçta 10 olarak ayarla
User prompt
50 skor yerine 100 100 artarsa sepet ve meyve hareket hızını % 3 arttır
User prompt
Skor 50 olunca sepeti hızlandırmayi % 5 artır ama bunu skor her 50 artarsa yap yani 50 100 150 ... Gibi
User prompt
Skor 50 olunca hızlanmayi kapat
User prompt
Bazı meyveler havada asılı kalıyor bunu düzeltebilir misin
User prompt
settingsMenuBtn1 basınca direk oyuna atsın ve sağ sol butonları açılsın
User prompt
settingsMenuBtn1 basınca elma toplama ahnesinde butonlar aktif edilsin
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Fruit class: represents a collectible fruit var Fruit = Container.expand(function () { var self = Container.call(this); // Randomly pick a fruit color for variety var fruitColors = [0xff3b3b, 0xffe14d, 0x4de14d, 0x4db8ff, 0xff7ff0]; var color = fruitColors[Math.floor(Math.random() * fruitColors.length)]; // Create a simple ellipse as fruit var fruitAsset = self.attachAsset('fruit', { width: 120, height: 120, color: color, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5 }); // Used for animation self.alpha = 0; self.scaleX = 0.7; self.scaleY = 0.7; // Animate fruit appearing tween(self, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 200, easing: tween.easeOut }); // For tracking if already collected self.collected = false; // Destroy with a pop animation self.collect = function (_onFinish) { if (self.collected) return; self.collected = true; tween(self, { scaleX: 1.4, scaleY: 1.4, alpha: 0 }, { duration: 180, easing: tween.easeIn, onFinish: function onFinish() { self.destroy(); if (_onFinish) _onFinish(); } }); }; return self; }); // Player class: draggable character var Player = Container.expand(function () { var self = Container.call(this); // Character is a colored box var playerAsset = self.attachAsset('player', { width: 140, height: 140, color: 0x3b7fff, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); // For a little style, add a face (ellipse for head, two eyes) var face = self.attachAsset('face', { width: 80, height: 80, color: 0xfffbe0, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5, x: 0, y: -10 }); var eyeL = self.attachAsset('eyeL', { width: 12, height: 12, color: 0x222222, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5, x: -18, y: -18 }); var eyeR = self.attachAsset('eyeR', { width: 12, height: 12, color: 0x222222, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5, x: 18, y: -18 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xf7f7f7 }); /**** * Game Code ****/ // Game constants // Tween plugin for fruit spawn/collect animations var GAME_WIDTH = 2048; var GAME_HEIGHT = 2732; var FRUIT_SPAWN_MIN = 900; // ms var FRUIT_SPAWN_MAX = 1800; // ms var FRUIT_LIFETIME = 2600; // ms before fruit disappears var WIN_SCORE = 20; var FRUIT_FALL_SPEED = 10; // Meyve hızı 10 // Game state var fruits = []; var player = null; var dragNode = null; var score = 0; var scoreTxt = null; var spawnTimer = null; var fruitSpawnInterval = FRUIT_SPAWN_MAX; var lastTouch = { x: GAME_WIDTH / 2, y: GAME_HEIGHT * 0.8 }; // Set up background color game.setBackgroundColor(0xf7f7f7); // --- START SCREEN OVERLAY --- var startOverlay = new Container(); startOverlay.width = GAME_WIDTH; startOverlay.height = GAME_HEIGHT; startOverlay.interactive = true; // Semi-transparent background var overlayBg = LK.getAsset('player', { width: GAME_WIDTH, height: GAME_HEIGHT, color: 0x000000, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); overlayBg.alpha = 0.8; startOverlay.addChild(overlayBg); // Add a new block at the top of the start screen var startTopBlock = LK.getAsset('startTopBlock', { anchorX: 0.5, anchorY: 0, x: GAME_WIDTH / 2, y: 200, //{18} // moved down by 200px width: GAME_WIDTH * 0.7, height: 640 }); startOverlay.addChild(startTopBlock); // "Başla" button (centered) - now as a dedicated asset, no text or title var startBtn = LK.getAsset('startBtn', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: GAME_HEIGHT / 2 }); startOverlay.addChild(startBtn); // Settings button (even further below start button, centered) var settingsBtn = LK.getAsset('settingsBtn', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: GAME_HEIGHT / 2 + 420 // moved up, now 420px below startBtn }); startOverlay.addChild(settingsBtn); // Settings menu overlay (hidden by default, shown as a separate "scene" when settings is pressed) var settingsMenuOverlay = new Container(); settingsMenuOverlay.width = GAME_WIDTH; settingsMenuOverlay.height = GAME_HEIGHT; settingsMenuOverlay.visible = false; settingsMenuOverlay.interactive = true; // Full screen background image for settings menu var settingsMenuBgImage = LK.getAsset('settingsMenuBg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: GAME_WIDTH, height: GAME_HEIGHT }); settingsMenuOverlay.addChild(settingsMenuBgImage); // Semi-transparent overlay for settings menu (for click-to-close) var settingsMenuBg = LK.getAsset('player', { width: GAME_WIDTH, height: GAME_HEIGHT, color: 0x000000, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); settingsMenuBg.alpha = 0.2; settingsMenuOverlay.addChild(settingsMenuBg); // Settings menu buttons (centered vertically: top, center, bottom) var menuBtnSpacing = 340; var menuBtnYCenter = GAME_HEIGHT / 2; var menuBtn1 = LK.getAsset('settingsMenuBtn1', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: menuBtnYCenter - menuBtnSpacing }); var menuBtn2 = LK.getAsset('settingsMenuBtn2', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: menuBtnYCenter }); var menuBtn3 = LK.getAsset('settingsMenuBtn3', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: menuBtnYCenter + menuBtnSpacing }); settingsMenuOverlay.addChild(menuBtn1); settingsMenuOverlay.addChild(menuBtn2); settingsMenuOverlay.addChild(menuBtn3); // Hide settings menu when background is pressed settingsMenuBg.down = function (x, y, obj) { settingsMenuOverlay.visible = false; startOverlay.visible = true; }; // Close menu on any menu button press menuBtn1.down = function (x, y, obj) { // Hide settings and start overlays settingsMenuOverlay.visible = false; if (startOverlay.parent) startOverlay.parent.removeChild(startOverlay); // Start the game if not already started if (!gameStarted) { gameStarted = true; showGameElements(); scheduleNextFruit(); } else { showGameElements(); } // Show move buttons directly leftBtn.visible = true; rightBtn.visible = true; moveButtonsVisible = true; }; menuBtn2.down = function (x, y, obj) { settingsMenuOverlay.visible = false; startOverlay.visible = true; }; menuBtn3.down = function (x, y, obj) { settingsMenuOverlay.visible = false; startOverlay.visible = true; }; game.addChild(settingsMenuOverlay); game.addChild(startOverlay); // Show settings menu as a separate "scene" when settingsBtn is pressed settingsBtn.down = function (x, y, obj) { settingsMenuOverlay.visible = true; startOverlay.visible = false; // Hide move buttons when not in game leftBtn.visible = false; rightBtn.visible = false; moveButtonsVisible = false; }; // --- GAME ELEMENTS (hidden until start) --- player = new Player(); player.x = GAME_WIDTH / 2; player.y = GAME_HEIGHT * 0.8; player.visible = false; game.addChild(player); scoreTxt = new Text2('0', { size: 120, fill: 0x222222 }); scoreTxt.anchor.set(0.5, 0); scoreTxt.visible = false; LK.gui.top.addChild(scoreTxt); // Add pause button below the score var pauseBtn = LK.getAsset('player', { width: 180, height: 110, color: 0x888888, shape: 'box', anchorX: 0.5, anchorY: 0, x: 0, // will be positioned by container y: 0 }); var pauseIcon = new Text2('⏸', { size: 80, fill: "#fff" }); pauseIcon.anchor.set(0.5, 0.5); pauseIcon.x = pauseBtn.width / 2; pauseIcon.y = pauseBtn.height / 2; pauseBtn.addChild(pauseIcon); // Container to position pauseBtn under score var pauseBtnContainer = new Container(); pauseBtnContainer.addChild(pauseBtn); pauseBtnContainer.x = 0; pauseBtnContainer.y = scoreTxt.height + 10; // 10px below score // Add to GUI, under score LK.gui.top.addChild(pauseBtnContainer); // Pause overlay (hidden by default) var pauseOverlay = new Container(); pauseOverlay.width = GAME_WIDTH; pauseOverlay.height = GAME_HEIGHT; pauseOverlay.visible = false; pauseOverlay.interactive = true; // Semi-transparent background with blur var pauseBg = LK.getAsset('player', { width: GAME_WIDTH, height: GAME_HEIGHT, color: 0x000000, shape: 'box', anchorX: 0, anchorY: 0, x: 0, y: 0 }); pauseBg.alpha = 0.10; pauseOverlay.addChild(pauseBg); // Add a blur effect to the overlay (simulate with a blurred asset if available, or just comment for now) // If LK.effects.blurScreen existed, we would use it. For now, we note the intent. // LK.effects.blurScreen(10); // Not available, so just use alpha // Add three asset-only blocks to pause overlay: Devam Et, Başa Dön, Ayarlar var pauseBlockSpacing = 340; var pauseBlockYCenter = GAME_HEIGHT / 2; // Devam Et (Continue) block as asset only var pauseContinueBlock = LK.getAsset('settingsMenuBtn1', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: pauseBlockYCenter - pauseBlockSpacing }); // Başa Dön (Return to Start) block as asset only var pauseRestartBlock = LK.getAsset('settingsMenuBtn2', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: pauseBlockYCenter }); // Ayarlar (Settings) block as asset only var pauseSettingsBlock = LK.getAsset('settingsMenuBtn3', { anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH / 2, y: pauseBlockYCenter + pauseBlockSpacing }); pauseOverlay.addChild(pauseContinueBlock); pauseOverlay.addChild(pauseRestartBlock); pauseOverlay.addChild(pauseSettingsBlock); // Button logic pauseContinueBlock.down = function (x, y, obj) { pauseOverlay.visible = false; showGameElements(); }; pauseRestartBlock.down = function (x, y, obj) { // Return to start: show start overlay, hide pause overlay, reset game state pauseOverlay.visible = false; if (!startOverlay.parent) game.addChild(startOverlay); hideGameElements(); gameStarted = false; // Clean up fruits and timers if (spawnTimer) LK.clearTimeout(spawnTimer); for (var i = 0; i < fruits.length; i++) { if (fruits[i]._timeout) LK.clearTimeout(fruits[i]._timeout); fruits[i].destroy(); } fruits = []; score = 0; updateScore(); player.x = GAME_WIDTH / 2; player.y = GAME_HEIGHT * 0.8; }; pauseSettingsBlock.down = function (x, y, obj) { pauseOverlay.visible = false; settingsMenuOverlay.visible = true; startOverlay.visible = false; leftBtn.visible = false; rightBtn.visible = false; moveButtonsVisible = false; }; // Add overlay to game game.addChild(pauseOverlay); // Pause button logic: show pause overlay, hide game elements pauseBtn.down = function (x, y, obj) { hideGameElements(); pauseOverlay.visible = true; }; pauseBtn.visible = false; // --- Add left/right move buttons, initially hidden, and a toggle button at top right --- // Button sizes and positions are optimized for mobile (large touch targets, no overlap with menu) var buttonSize = 260; var buttonMargin = 120; var buttonY = GAME_HEIGHT - buttonSize - 60; // Toggle button (top right, avoid top left 100x100 and right edge) var toggleBtnSize = 120; var toggleBtn = LK.getAsset('player', { width: toggleBtnSize, height: toggleBtnSize, color: 0x222222, shape: 'box', anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH - 100 - toggleBtnSize / 2 - 20, // right margin, avoid top right 100x100 y: 100 / 2 + 20 }); var toggleIcon = new Text2('☰', { size: 80, fill: "#fff" }); toggleIcon.anchor.set(0.5, 0.5); toggleIcon.x = toggleBtn.width / 2; toggleIcon.y = toggleBtn.height / 2; toggleBtn.addChild(toggleIcon); toggleBtn.visible = false; game.addChild(toggleBtn); // Left button (bottom left, above safe margin) var leftBtn = LK.getAsset('player', { width: buttonSize, height: buttonSize, color: 0x3b7fff, shape: 'box', anchorX: 0.5, anchorY: 0.5, x: buttonMargin + buttonSize / 2, y: buttonY }); var leftArrow = new Text2('◀', { size: 180, fill: "#fff" }); leftArrow.anchor.set(0.5, 0.5); leftArrow.x = leftBtn.width / 2; leftArrow.y = leftBtn.height / 2; leftBtn.addChild(leftArrow); leftBtn.visible = false; // Right button (bottom right, above safe margin) var rightBtn = LK.getAsset('player', { width: buttonSize, height: buttonSize, color: 0x3b7fff, shape: 'box', anchorX: 0.5, anchorY: 0.5, x: GAME_WIDTH - buttonMargin - buttonSize / 2, y: buttonY }); var rightArrow = new Text2('▶', { size: 180, fill: "#fff" }); rightArrow.anchor.set(0.5, 0.5); rightArrow.x = rightBtn.width / 2; rightArrow.y = rightBtn.height / 2; rightBtn.addChild(rightArrow); rightBtn.visible = false; game.addChild(leftBtn); game.addChild(rightBtn); // Toggle logic var moveButtonsVisible = false; toggleBtn.down = function (x, y, obj) { moveButtonsVisible = !moveButtonsVisible; leftBtn.visible = moveButtonsVisible; rightBtn.visible = moveButtonsVisible; }; // --- START BUTTON LOGIC --- function showGameElements() { player.visible = true; scoreTxt.visible = true; toggleBtn.visible = true; pauseBtn.visible = true; // Hide pause overlay if visible if (typeof pauseOverlay !== "undefined") pauseOverlay.visible = false; // Move buttons are only visible if toggled, but always hidden at game start leftBtn.visible = false; rightBtn.visible = false; moveButtonsVisible = false; } function hideGameElements() { player.visible = false; scoreTxt.visible = false; toggleBtn.visible = false; pauseBtn.visible = false; leftBtn.visible = false; rightBtn.visible = false; moveButtonsVisible = false; // Hide pause overlay if visible if (typeof pauseOverlay !== "undefined") pauseOverlay.visible = false; } // When start is pressed, remove overlay and show game elements, start fruit spawning var gameStarted = false; startBtn.down = function (x, y, obj) { if (gameStarted) return; gameStarted = true; // Start shrink animation for startTopBlock tween(startTopBlock, { scaleX: 0.1, scaleY: 0.1, alpha: 0 }, { duration: 400, easing: tween.cubicIn, onFinish: function onFinish() { if (startOverlay.parent) startOverlay.parent.removeChild(startOverlay); showGameElements(); scheduleNextFruit(); } }); }; hideGameElements(); // Button press logic var moveBtnInterval = null; // Pürüzsüz hareket için hız ve hedef yön var MOVE_SPEED = 32; // px/frame, pürüzsüz hız (20'den biraz daha hızlı, ayarlanabilir) var playerVelocity = 0; var playerTargetDir = 0; // -1: sola, 1: sağa, 0: dur // Sepet hızlandırma için çarpan (her 50'de %5 artar) var playerSpeedMultiplier = 1; var lastSpeedupScore = 0; // Touch/hold left leftBtn.down = function (x, y, obj) { if (!leftBtn.visible) return; playerTargetDir = -1; }; leftBtn.up = function (x, y, obj) { if (playerTargetDir === -1) playerTargetDir = 0; }; // Touch/hold right rightBtn.down = function (x, y, obj) { if (!rightBtn.visible) return; playerTargetDir = 1; }; rightBtn.up = function (x, y, obj) { if (playerTargetDir === 1) playerTargetDir = 0; }; // Helper: update score display function updateScore() { scoreTxt.setText(score); } // Helper: spawn a fruit at a random X position at the top, and make it fall down function spawnFruit() { // Avoid top 100px (menu), and bottom 200px (player area) var margin = 140; var minX = margin; var maxX = GAME_WIDTH - margin; var fruit = new Fruit(); fruit.x = Math.floor(Math.random() * (maxX - minX)) + minX; fruit.y = 120; // Always spawn at the top // All fruits have the same fall speed, controlled by a single variable fruit.fallSpeed = FRUIT_FALL_SPEED; // Track lastY for good practice fruit.lastY = fruit.y; fruits.push(fruit); game.addChild(fruit); // Fruit will only be removed if collected or falls below the screen } // Helper: schedule next fruit spawn, with increasing speed function scheduleNextFruit() { if (!gameStarted) return; // As score increases, spawn interval decreases var minInterval = FRUIT_SPAWN_MIN; var maxInterval = FRUIT_SPAWN_MAX; var progress = Math.min(score / WIN_SCORE, 1); fruitSpawnInterval = maxInterval - (maxInterval - minInterval) * progress; var nextIn = Math.floor(fruitSpawnInterval * (0.7 + Math.random() * 0.6)); // randomize a bit spawnTimer = LK.setTimeout(function () { if (!gameStarted) return; spawnFruit(); scheduleNextFruit(); }, nextIn); } // Dragging logic game.down = function (x, y, obj) { if (!gameStarted) return; // Only start drag if touch is on player (or close to it) var dx = x - player.x; var dy = y - player.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist < 120) { dragNode = player; lastTouch.x = x; lastTouch.y = y; } }; game.move = function (x, y, obj) { if (!gameStarted) return; if (dragNode === player) { // Allow player to move only in X direction, clamp within game area var moveMultiplier = playerSpeedMultiplier; var px = Math.max(70, Math.min(GAME_WIDTH - 70, x)); // Stop any previous tween on player.x to avoid stacking tween.stop(player, { x: true }); tween(player, { x: px }, { duration: Math.round(90 / 1.3) / moveMultiplier, // 30% faster easing: tween.cubicOut }); // Y stays fixed at initial position (bottom 20% of screen) lastTouch.x = px; lastTouch.y = player.y; } }; game.up = function (x, y, obj) { if (!gameStarted) return; dragNode = null; }; // Main update loop: check for fruit collection game.update = function () { if (!gameStarted) return; if (pauseOverlay.visible) return; // FRUIT_FALL_SPEED is now handled by 100s logic above, no need to reset here // Pürüzsüz sepet hareketi if (!dragNode) { // Her +100'de bir %3 hızlandır (örn: 100, 200, 300, ...), ve bunu her zaman uygula if (Math.floor(score / 100) > Math.floor(lastSpeedupScore / 100)) { var speedupSteps = Math.floor(score / 100) - Math.floor(lastSpeedupScore / 100); for (var s = 0; s < speedupSteps; s++) { playerSpeedMultiplier *= 1.03; FRUIT_FALL_SPEED *= 1.03; } lastSpeedupScore = Math.floor(score / 100) * 100; } // Sadece butonla hareket ediyorsa var moveMultiplier = playerSpeedMultiplier; // Hedef hıza doğru yumuşak geçiş (smooth acceleration) var targetVelocity = playerTargetDir * MOVE_SPEED * moveMultiplier; // Linear interpolation (lerp) ile hız geçişi playerVelocity += (targetVelocity - playerVelocity) * 0.22; // Eğer hedef durmaksa, yavaşça sıfıra yaklaşsın if (playerTargetDir === 0 && Math.abs(playerVelocity) < 1) playerVelocity = 0; var nextX = player.x + playerVelocity; // Clamp to game area nextX = Math.max(70, Math.min(GAME_WIDTH - 70, nextX)); player.x = nextX; lastTouch.x = player.x; lastTouch.y = player.y; } for (var i = fruits.length - 1; i >= 0; i--) { var fruit = fruits[i]; if (fruit.collected) continue; // Always update fruit fall speed in case it changed (prevents stuck fruits) fruit.fallSpeed = FRUIT_FALL_SPEED; // Move fruit down fruit.lastY = fruit.lastY === undefined ? fruit.y : fruit.lastY; fruit.y += fruit.fallSpeed; // Remove fruit if it falls below the screen (bottom margin) if (fruit.lastY <= GAME_HEIGHT - 120 && fruit.y > GAME_HEIGHT - 120) { if (!fruit.collected) { // Decrease score by 5 if missed score -= 5; if (score < 0) score = 0; updateScore(); fruit.collect(function () { // Remove from array for (var j = 0; j < fruits.length; j++) { if (fruits[j] === fruit) { fruits.splice(j, 1); break; } } }); } // Cancel fruit timeout if (fruit._timeout) LK.clearTimeout(fruit._timeout); continue; } // Check intersection with player if (player.intersects(fruit)) { fruit.collect(function () { // Remove from array for (var j = 0; j < fruits.length; j++) { if (fruits[j] === fruit) { fruits.splice(j, 1); break; } } }); // Cancel fruit timeout if (fruit._timeout) LK.clearTimeout(fruit._timeout); // Add score score += 10; updateScore(); // Win condition removed: no win popup or flash when score reaches WIN_SCORE } fruit.lastY = fruit.y; } }; // On game over or win, cleanup timers game.onDestroy = function () { if (spawnTimer) LK.clearTimeout(spawnTimer); for (var i = 0; i < fruits.length; i++) { if (fruits[i]._timeout) LK.clearTimeout(fruits[i]._timeout); } fruits = []; }; // Initial score updateScore();
===================================================================
--- original.js
+++ change.js
@@ -110,10 +110,10 @@
/****
* Game Code
****/
-// Tween plugin for fruit spawn/collect animations
// Game constants
+// Tween plugin for fruit spawn/collect animations
var GAME_WIDTH = 2048;
var GAME_HEIGHT = 2732;
var FRUIT_SPAWN_MIN = 900; // ms
var FRUIT_SPAWN_MAX = 1800; // ms
@@ -335,56 +335,32 @@
pauseOverlay.addChild(pauseBg);
// Add a blur effect to the overlay (simulate with a blurred asset if available, or just comment for now)
// If LK.effects.blurScreen existed, we would use it. For now, we note the intent.
// LK.effects.blurScreen(10); // Not available, so just use alpha
-// Add three blocks to pause overlay: Devam Et, Başa Dön, Ayarlar
+// Add three asset-only blocks to pause overlay: Devam Et, Başa Dön, Ayarlar
var pauseBlockSpacing = 340;
var pauseBlockYCenter = GAME_HEIGHT / 2;
-// Devam Et (Continue) block
+// Devam Et (Continue) block as asset only
var pauseContinueBlock = LK.getAsset('settingsMenuBtn1', {
anchorX: 0.5,
anchorY: 0.5,
x: GAME_WIDTH / 2,
y: pauseBlockYCenter - pauseBlockSpacing
});
-var pauseContinueText = new Text2('Devam Et', {
- size: 90,
- fill: "#222"
-});
-pauseContinueText.anchor.set(0.5, 0.5);
-pauseContinueText.x = pauseContinueBlock.width / 2;
-pauseContinueText.y = pauseContinueBlock.height / 2;
-pauseContinueBlock.addChild(pauseContinueText);
-// Başa Dön (Return to Start) block
+// Başa Dön (Return to Start) block as asset only
var pauseRestartBlock = LK.getAsset('settingsMenuBtn2', {
anchorX: 0.5,
anchorY: 0.5,
x: GAME_WIDTH / 2,
y: pauseBlockYCenter
});
-var pauseRestartText = new Text2('Başa Dön', {
- size: 90,
- fill: "#222"
-});
-pauseRestartText.anchor.set(0.5, 0.5);
-pauseRestartText.x = pauseRestartBlock.width / 2;
-pauseRestartText.y = pauseRestartBlock.height / 2;
-pauseRestartBlock.addChild(pauseRestartText);
-// Ayarlar (Settings) block
+// Ayarlar (Settings) block as asset only
var pauseSettingsBlock = LK.getAsset('settingsMenuBtn3', {
anchorX: 0.5,
anchorY: 0.5,
x: GAME_WIDTH / 2,
y: pauseBlockYCenter + pauseBlockSpacing
});
-var pauseSettingsText = new Text2('Ayarlar', {
- size: 90,
- fill: "#222"
-});
-pauseSettingsText.anchor.set(0.5, 0.5);
-pauseSettingsText.x = pauseSettingsBlock.width / 2;
-pauseSettingsText.y = pauseSettingsBlock.height / 2;
-pauseSettingsBlock.addChild(pauseSettingsText);
pauseOverlay.addChild(pauseContinueBlock);
pauseOverlay.addChild(pauseRestartBlock);
pauseOverlay.addChild(pauseSettingsBlock);
// Button logic
Start button . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Settings button. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Left right button. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A hand. In-Game asset. High contrast. No shadows. 2 d
Between two button a hand. In-Game asset. 2d. High contrast. No shadows
A farm. In-Game asset. 2d. High contrast. No shadows
Left button. In-Game asset. 2d. High contrast. No shadows
Devam et. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Basket. In-Game asset. 2d. High contrast. No shadows
Banana. In-Game asset. 2d. High contrast. No shadows
Left button. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Apple. In-Game asset. 2d. High contrast. No shadows
Grape. In-Game asset. 2d. High contrast. No shadows
Potato. In-Game asset. 2d. High contrast. No shadows