User prompt
ana menüdeki pause tuşu kaldırılsın
User prompt
sol yukardaki pause tuşuna basınca çık veya devam et seçenekleri çıksın
User prompt
durdurma tuşuna basınca ana menüye dön veya devam et diye seçenek çıksın
User prompt
müzik açma kapatma tuşu olsun ekranda ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
oyun önceki haline geri dönsün tam ekranı kaldır
User prompt
oyun sadece tam ekran oynansın
User prompt
oyun tam ekran oynansın
User prompt
kavunda kaldırılsın
User prompt
salatalık oyundan kaldırılsın ve mısırda
User prompt
oyundaki bütün yazılar türkçe olsun
User prompt
oyunun ana menüsünde huzur verici bir müzik çalsın
User prompt
oyuna armut ananas salatalık mısır karpuz kavun ekle
User prompt
skor tablosunu biraz daha uzun göstersin
User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.lastGameResults = transformationResults;' Line Number: 423 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
kivi ekle oyuna
User prompt
2 dakika olsun
User prompt
3 dakika olsun süre
User prompt
5 dakikalık bir süre olsun bu süre içinde kaç tane meyveye dönüştüğünü tabloda göstersin ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
meyveler biraz hızlı gelsin
User prompt
bombalar biraz daha hızlı gelsin
User prompt
domatesli arka plan eklensin oyuna
User prompt
oyuna başlarken play veya stop tuşuna basılsın
User prompt
karakter aynı meyveden 5 tane yerse ona dönüşsün
User prompt
karakter biraz hızlı olsun
User prompt
karakter her 5 meyve yediğinde öbür mevyeye dönüşsün
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Bomb = Container.expand(function () { var self = Container.call(this); var bombGraphics = self.attachAsset('bomb', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 7 + Math.random() * 4; self.update = function () { self.y += self.speed; }; return self; }); var Fruit = Container.expand(function (fruitType) { var self = Container.call(this); var fruitGraphics = self.attachAsset(fruitType, { anchorX: 0.5, anchorY: 0.5 }); self.fruitType = fruitType; self.speed = 3 + Math.random() * 2; self.update = function () { self.y += self.speed; }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 12; self.fruitCount = 0; self.currentFruitType = null; self.transformed = false; self.moveLeft = function () { if (self.x > 60) { self.x -= self.speed; } }; self.moveRight = function () { if (self.x < 2048 - 60) { self.x += self.speed; } }; self.collectFruit = function (fruitType) { if (self.currentFruitType === null || self.currentFruitType === fruitType) { self.currentFruitType = fruitType; self.fruitCount++; LK.getSound('collect').play(); if (self.fruitCount >= 5) { self.transform(fruitType); } } else { self.resetProgress(); } updateCounterText(); }; self.resetProgress = function () { self.fruitCount = 0; self.currentFruitType = null; self.transformed = false; // Reset to original player graphics if transformed if (self.transformed) { self.removeChild(playerGraphics); playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); } }; self.transform = function (fruitType) { self.transformed = true; LK.getSound('transform').play(); // Remove old graphics and add new fruit graphics self.removeChild(playerGraphics); playerGraphics = self.attachAsset(fruitType, { anchorX: 0.5, anchorY: 0.5 }); LK.setScore(LK.getScore() + 100); scoreText.setText('Score: ' + LK.getScore()); tween(playerGraphics, { scaleX: 1.3, scaleY: 1.3 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(playerGraphics, { scaleX: 1, scaleY: 1 }, { duration: 200, easing: tween.easeIn }); } }); self.resetProgress(); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87ceeb }); /**** * Game Code ****/ // Add tomato background var tomatoBackground = game.addChild(LK.getAsset('tomato_bg', { anchorX: 0, anchorY: 0 })); tomatoBackground.x = 0; tomatoBackground.y = 0; var player; var fruits = []; var bombs = []; var gameRunning = false; // Start with game not running var gameStarted = false; // Track if game has started var leftPressed = false; var rightPressed = false; var spawnTimer = 0; var scoreText; var counterText; var playButton; var stopButton; var startMenu; // Create start menu startMenu = game.addChild(new Container()); // Create play button playButton = startMenu.addChild(LK.getAsset('player', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 })); playButton.x = 2048 / 2 - 200; playButton.y = 2732 / 2; // Create stop button stopButton = startMenu.addChild(LK.getAsset('bomb', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 })); stopButton.x = 2048 / 2 + 200; stopButton.y = 2732 / 2; // Add button labels var playText = new Text2('PLAY', { size: 80, fill: 0x00FF00 }); playText.anchor.set(0.5, 0.5); playText.x = playButton.x; playText.y = playButton.y + 150; startMenu.addChild(playText); var stopText = new Text2('STOP', { size: 80, fill: 0xFF0000 }); stopText.anchor.set(0.5, 0.5); stopText.x = stopButton.x; stopText.y = stopButton.y + 150; startMenu.addChild(stopText); // Initialize player (hidden initially) player = game.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 - 200; player.visible = false; // Initialize UI (hidden initially) scoreText = new Text2('Score: 0', { size: 60, fill: 0xFFFFFF }); scoreText.anchor.set(0, 0); LK.gui.topLeft.addChild(scoreText); scoreText.x = 120; scoreText.y = 20; scoreText.visible = false; counterText = new Text2('Collect: 0/5', { size: 50, fill: 0xFFFFFF }); counterText.anchor.set(0.5, 0); LK.gui.top.addChild(counterText); counterText.y = 100; counterText.visible = false; function updateCounterText() { var fruitName = player.currentFruitType || 'fruits'; counterText.setText(fruitName + ': ' + player.fruitCount + '/5'); } function startGame() { gameStarted = true; gameRunning = true; // Hide start menu startMenu.visible = false; // Show player player.visible = true; // Start background music LK.playMusic('bgMusic'); // Show UI elements scoreText.visible = true; counterText.visible = true; } // Keyboard controls var keys = {}; LK.on('keydown', function (e) { keys[e.keyCode] = true; }); LK.on('keyup', function (e) { keys[e.keyCode] = false; }); // Touch controls (backup) var touchStartX = null; var touchCurrentX = null; game.down = function (x, y, obj) { if (!gameStarted) { // Check if play button was clicked var playButtonBounds = { left: playButton.x - 100, right: playButton.x + 100, top: playButton.y - 100, bottom: playButton.y + 100 }; // Check if stop button was clicked var stopButtonBounds = { left: stopButton.x - 100, right: stopButton.x + 100, top: stopButton.y - 100, bottom: stopButton.y + 100 }; if (x >= playButtonBounds.left && x <= playButtonBounds.right && y >= playButtonBounds.top && y <= playButtonBounds.bottom) { // Start game startGame(); } else if (x >= stopButtonBounds.left && x <= stopButtonBounds.right && y >= stopButtonBounds.top && y <= stopButtonBounds.bottom) { // Exit game LK.showGameOver(); } } else { // Normal touch controls for gameplay touchStartX = x; touchCurrentX = x; } }; game.move = function (x, y, obj) { if (touchStartX !== null) { touchCurrentX = x; } }; game.up = function (x, y, obj) { touchStartX = null; touchCurrentX = null; }; function spawnFruit() { var fruitTypes = ['apple', 'orange', 'banana', 'grape']; var randomType = fruitTypes[Math.floor(Math.random() * fruitTypes.length)]; var fruit = new Fruit(randomType); fruit.x = Math.random() * (2048 - 160) + 80; fruit.y = -80; fruits.push(fruit); game.addChild(fruit); } function spawnBomb() { var bomb = new Bomb(); bomb.x = Math.random() * (2048 - 180) + 90; bomb.y = -90; bombs.push(bomb); game.addChild(bomb); } game.update = function () { if (!gameStarted || !gameRunning) return; // Handle keyboard movement (arrow keys: left=37, right=39, A=65) if (keys[37] || keys[65]) { // Left arrow or A key player.moveLeft(); } if (keys[39]) { // Right arrow player.moveRight(); } // Handle touch movement (backup) if (touchStartX !== null && touchCurrentX !== null) { var deltaX = touchCurrentX - touchStartX; if (deltaX < -50) { player.moveLeft(); } else if (deltaX > 50) { player.moveRight(); } } // Spawn objects spawnTimer++; if (spawnTimer % 80 === 0) { spawnFruit(); } if (spawnTimer % 150 === 0) { spawnBomb(); } // Update and check fruits for (var i = fruits.length - 1; i >= 0; i--) { var fruit = fruits[i]; if (fruit.lastY === undefined) fruit.lastY = fruit.y; // Remove off-screen fruits if (fruit.lastY <= 2732 && fruit.y > 2732) { fruit.destroy(); fruits.splice(i, 1); continue; } // Check collision with player if (fruit.intersects(player)) { player.collectFruit(fruit.fruitType); LK.setScore(LK.getScore() + 10); scoreText.setText('Score: ' + LK.getScore()); fruit.destroy(); fruits.splice(i, 1); continue; } fruit.lastY = fruit.y; } // Update and check bombs for (var j = bombs.length - 1; j >= 0; j--) { var bomb = bombs[j]; if (bomb.lastY === undefined) bomb.lastY = bomb.y; // Remove off-screen bombs if (bomb.lastY <= 2732 && bomb.y > 2732) { bomb.destroy(); bombs.splice(j, 1); continue; } // Check collision with player if (bomb.intersects(player)) { LK.getSound('explode').play(); LK.stopMusic(); LK.playMusic('sadMusic'); gameRunning = false; LK.effects.flashScreen(0xff0000, 1000); LK.setTimeout(function () { LK.showGameOver(); }, 1500); bomb.destroy(); bombs.splice(j, 1); continue; } bomb.lastY = bomb.y; } }; // Initialize counter text updateCounterText();
===================================================================
--- original.js
+++ change.js
@@ -11,9 +11,9 @@
var bombGraphics = self.attachAsset('bomb', {
anchorX: 0.5,
anchorY: 0.5
});
- self.speed = 4 + Math.random() * 3;
+ self.speed = 7 + Math.random() * 4;
self.update = function () {
self.y += self.speed;
};
return self;
bomba. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Elma. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
muz. In-Game asset. 2d. High contrast. No shadows
portakal. In-Game asset. 2d. High contrast. No shadows
Üzüm. In-Game asset. 2d. High contrast. No shadows
gülen domates. In-Game asset. 2d. High contrast. No shadows
orman büyük olsun. In-Game asset. 2d. High contrast. No shadows
kivi. In-Game asset. 2d. High contrast. No shadows
Ananas. In-Game asset. 2d. High contrast. No shadows
Armut. In-Game asset. 2d. High contrast. No shadows
karpuz. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat