User prompt
ana menüdeki dil değiştirdiğimiz butonu kaldır çabuk
User prompt
ana menüdeki how to playin altına bide dil butonu ekliyelim türkçe dil olsun ingilizce olsun ispanyolca olsun arapça olsun ve japonca olsun bu dillerin yazıları yine ing olsun
User prompt
oyun değiştiya nasıl oynanır kısmını da değiştir
User prompt
bence birbirine değen ne kadar top varsa hepsi patlasın (min 3 olması lazım yine) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
butona tıklandığında şekerler gitmiyor
User prompt
butonu ekranın aynı hizada sağ tarafına alsak
User prompt
bir buton eklesek tekrar ana menüye dönmek içi üç çizgili bir şekilde şeker temalı aynı ana menüdeki gibi ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
yine aynısı oldu
User prompt
oyuna girdiğimde nasıl oynanır butonunun olduğu konuma tıkladığımda iç içe giriyor
User prompt
ana menü ile şekerler iç içe girdi buglandı sorunu düzelt
User prompt
Please fix the bug: 'self.insertChildAt is not a function' in or related to this line: 'self.insertChildAt(titleShadow, self.getChildIndex(titleText));' Line Number: 288
User prompt
ana menüyü biraz daha havalı yap ve geliştir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
ana menü yap başlatma butonu oyunun adı animasyonlu bir şekilde çıksın ve başlatma butonunun yanına birde nasıl oynanır butonu ekle ve nasıl oynandığını yaz ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
ana menü yap başlatma butonu oyunun adı animasyonlu bir şekilde çıksın ve başlatma butonunun yanına birde nasıl oynanır butonu ekle ve nasıl oynandığını yaz ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
ingilizce yap tüm yazıları ve ana menü yap seviyeyi kaldır hamleyi kaldır sonsuz olsun oyun
User prompt
- **Taş Efekti**: Güçlü kombinasyonlarda ekranın sallanması ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
- **Skor Animasyonu**: Puan artışı sırasında sayıların yükselmesi ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
- **Combo Yazıları**: "Great!", "Awesome!", "Fantastic!" gibi yazılar ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
- **Partikül Efektleri**: Şekerler patlarken renkli partikül saçılması ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
images daki backgroundu arka plan yap
User prompt
arka plandaki o morluğu değiştirsek nasıl olur onun yerine candy crush oyunundaki arka plan olsun
User prompt
neyse sonuncu yaptığımızı kaldır
User prompt
belli bir hamle olsun o hamleye kadar patlatamazsak bitsin
User prompt
bomba ile ilgili herşeyi sil
User prompt
bomba ekle aynı candy crushtaki gibi ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Candy = Container.expand(function (type) {
var self = Container.call(this);
self.candyType = type || 1;
self.gridX = 0;
self.gridY = 0;
self.isAnimating = false;
self.isMatched = false;
var candyGraphics = self.attachAsset('candy' + self.candyType, {
anchorX: 0.5,
anchorY: 0.5
});
self.setGridPosition = function (gridX, gridY) {
self.gridX = gridX;
self.gridY = gridY;
self.x = GRID_START_X + gridX * CELL_SIZE + CELL_SIZE / 2;
self.y = GRID_START_Y + gridY * CELL_SIZE + CELL_SIZE / 2;
};
self.animateToPosition = function (targetX, targetY, callback) {
self.isAnimating = true;
tween(self, {
x: targetX,
y: targetY
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
self.isAnimating = false;
if (callback) callback();
}
});
};
self.animateFall = function (newGridY, callback) {
var targetY = GRID_START_Y + newGridY * CELL_SIZE + CELL_SIZE / 2;
self.gridY = newGridY;
self.animateToPosition(self.x, targetY, callback);
};
self.markForRemoval = function () {
self.isMatched = true;
tween(self, {
alpha: 0,
scaleX: 0.1,
scaleY: 0.1
}, {
duration: 200,
easing: tween.easeIn
});
};
return self;
});
var ComboText = Container.expand(function (message, x, y, color) {
var self = Container.call(this);
self.x = x;
self.y = y;
var comboTextDisplay = new Text2(message, {
size: 120,
fill: color || 0xFFFFFF
});
comboTextDisplay.anchor.set(0.5, 0.5);
self.addChild(comboTextDisplay);
// Initial state
self.alpha = 0;
self.scaleX = 0.5;
self.scaleY = 0.5;
// Animate in
tween(self, {
alpha: 1,
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 200,
easing: tween.easeOut,
onFinish: function onFinish() {
// Hold for a moment
LK.setTimeout(function () {
// Animate out
tween(self, {
alpha: 0,
scaleX: 1.5,
scaleY: 1.5,
y: self.y - 100
}, {
duration: 300,
easing: tween.easeIn,
onFinish: function onFinish() {
self.destroy();
var index = comboTexts.indexOf(self);
if (index > -1) {
comboTexts.splice(index, 1);
}
}
});
}, 800);
}
});
return self;
});
var Particle = Container.expand(function (color, startX, startY) {
var self = Container.call(this);
self.x = startX;
self.y = startY;
self.velocityX = (Math.random() - 0.5) * 400;
self.velocityY = (Math.random() - 0.5) * 400;
self.gravity = 300;
self.life = 1.0;
self.maxLife = 1.0;
var particleGraphics = self.attachAsset('particle', {
anchorX: 0.5,
anchorY: 0.5
});
particleGraphics.tint = color;
particleGraphics.scaleX = Math.random() * 0.8 + 0.4;
particleGraphics.scaleY = particleGraphics.scaleX;
self.update = function () {
self.x += self.velocityX * (1 / 60);
self.y += self.velocityY * (1 / 60);
self.velocityY += self.gravity * (1 / 60);
self.life -= 1 / 60 * 2;
var alpha = self.life / self.maxLife;
self.alpha = alpha;
self.scaleX = alpha * particleGraphics.scaleX;
self.scaleY = alpha * particleGraphics.scaleY;
if (self.life <= 0) {
self.destroy();
var index = particles.indexOf(self);
if (index > -1) {
particles.splice(index, 1);
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xff69b4
});
/****
* Game Code
****/
var GRID_SIZE = 8;
var CELL_SIZE = 200;
var GRID_START_X = (2048 - GRID_SIZE * CELL_SIZE) / 2;
var GRID_START_Y = 400;
var gameGrid = [];
var candyTypes = [1, 2, 3, 4, 5, 6];
var selectedCandy = null;
var isProcessing = false;
var movesLeft = 999999;
var score = 0;
var animatingCandies = 0;
var particles = [];
var comboTexts = [];
var currentCombo = 0;
// Initialize grid array
for (var x = 0; x < GRID_SIZE; x++) {
gameGrid[x] = [];
for (var y = 0; y < GRID_SIZE; y++) {
gameGrid[x][y] = null;
}
}
// UI Elements
var scoreText = new Text2('Score: 0', {
size: 80,
fill: 0xFFFFFF
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
// Create background image
var backgroundImage = LK.getAsset('background', {
anchorX: 0.5,
anchorY: 0.5
});
backgroundImage.x = 2048 / 2;
backgroundImage.y = 2732 / 2;
backgroundImage.scaleX = 2048 / backgroundImage.width;
backgroundImage.scaleY = 2732 / backgroundImage.height;
game.addChild(backgroundImage);
// Draw grid background
for (var x = 0; x < GRID_SIZE; x++) {
for (var y = 0; y < GRID_SIZE; y++) {
var cell = LK.getAsset('gridCell', {
anchorX: 0.5,
anchorY: 0.5
});
cell.x = GRID_START_X + x * CELL_SIZE + CELL_SIZE / 2;
cell.y = GRID_START_Y + y * CELL_SIZE + CELL_SIZE / 2;
cell.alpha = 0.4;
cell.tint = 0xffffff;
game.addChild(cell);
}
}
function getRandomCandyType() {
return candyTypes[Math.floor(Math.random() * candyTypes.length)];
}
function createCandy(x, y, type) {
if (!type) type = getRandomCandyType();
var candy = new Candy(type);
candy.setGridPosition(x, y);
gameGrid[x][y] = candy;
game.addChild(candy);
return candy;
}
function initializeGrid() {
for (var x = 0; x < GRID_SIZE; x++) {
for (var y = 0; y < GRID_SIZE; y++) {
var type;
var attempts = 0;
do {
type = getRandomCandyType();
attempts++;
} while (attempts < 10 && wouldCreateMatch(x, y, type));
createCandy(x, y, type);
}
}
}
function wouldCreateMatch(x, y, type) {
var horizontalCount = 1;
var verticalCount = 1;
// Check horizontal
for (var i = x - 1; i >= 0 && gameGrid[i][y] && gameGrid[i][y].candyType === type; i--) {
horizontalCount++;
}
for (var i = x + 1; i < GRID_SIZE && gameGrid[i][y] && gameGrid[i][y].candyType === type; i++) {
horizontalCount++;
}
// Check vertical
for (var i = y - 1; i >= 0 && gameGrid[x][i] && gameGrid[x][i].candyType === type; i--) {
verticalCount++;
}
for (var i = y + 1; i < GRID_SIZE && gameGrid[x][i] && gameGrid[x][i].candyType === type; i++) {
verticalCount++;
}
return horizontalCount >= 3 || verticalCount >= 3;
}
function getCandyAt(worldX, worldY) {
var gridX = Math.floor((worldX - GRID_START_X) / CELL_SIZE);
var gridY = Math.floor((worldY - GRID_START_Y) / CELL_SIZE);
if (gridX >= 0 && gridX < GRID_SIZE && gridY >= 0 && gridY < GRID_SIZE) {
return gameGrid[gridX][gridY];
}
return null;
}
function areAdjacent(candy1, candy2) {
var dx = Math.abs(candy1.gridX - candy2.gridX);
var dy = Math.abs(candy1.gridY - candy2.gridY);
return dx === 1 && dy === 0 || dx === 0 && dy === 1;
}
function swapCandies(candy1, candy2) {
var tempX = candy1.gridX;
var tempY = candy1.gridY;
var tempPosX = candy1.x;
var tempPosY = candy1.y;
gameGrid[candy1.gridX][candy1.gridY] = candy2;
gameGrid[candy2.gridX][candy2.gridY] = candy1;
candy1.gridX = candy2.gridX;
candy1.gridY = candy2.gridY;
candy2.gridX = tempX;
candy2.gridY = tempY;
animatingCandies += 2;
// Play boing sound when candies are swapped
LK.getSound('boing').play();
candy1.animateToPosition(candy2.x, candy2.y, function () {
animatingCandies--;
});
candy2.animateToPosition(tempPosX, tempPosY, function () {
animatingCandies--;
});
}
function findMatches() {
var matches = [];
var marked = [];
for (var x = 0; x < GRID_SIZE; x++) {
marked[x] = [];
for (var y = 0; y < GRID_SIZE; y++) {
marked[x][y] = false;
}
}
// Check horizontal matches
for (var y = 0; y < GRID_SIZE; y++) {
var count = 1;
var currentType = gameGrid[0][y] ? gameGrid[0][y].candyType : null;
for (var x = 1; x < GRID_SIZE; x++) {
var candy = gameGrid[x][y];
if (candy && candy.candyType === currentType) {
count++;
} else {
if (count >= 3) {
for (var i = x - count; i < x; i++) {
if (!marked[i][y]) {
matches.push(gameGrid[i][y]);
marked[i][y] = true;
}
}
}
count = 1;
currentType = candy ? candy.candyType : null;
}
}
if (count >= 3) {
for (var i = GRID_SIZE - count; i < GRID_SIZE; i++) {
if (!marked[i][y]) {
matches.push(gameGrid[i][y]);
marked[i][y] = true;
}
}
}
}
// Check vertical matches
for (var x = 0; x < GRID_SIZE; x++) {
var count = 1;
var currentType = gameGrid[x][0] ? gameGrid[x][0].candyType : null;
for (var y = 1; y < GRID_SIZE; y++) {
var candy = gameGrid[x][y];
if (candy && candy.candyType === currentType) {
count++;
} else {
if (count >= 3) {
for (var i = y - count; i < y; i++) {
if (!marked[x][i]) {
matches.push(gameGrid[x][i]);
marked[x][i] = true;
}
}
}
count = 1;
currentType = candy ? candy.candyType : null;
}
}
if (count >= 3) {
for (var i = GRID_SIZE - count; i < GRID_SIZE; i++) {
if (!marked[x][i]) {
matches.push(gameGrid[x][i]);
marked[x][i] = true;
}
}
}
}
return matches;
}
function removeMatches(matches) {
if (matches.length === 0) return;
LK.getSound('match').play();
for (var i = 0; i < matches.length; i++) {
var candy = matches[i];
// Create particle explosion for each candy
var candyColors = [0xff6b6b, 0x4ecdc4, 0x45b7d1, 0xf9ca24, 0xf0932b, 0xeb4d4b];
var particleColor = candyColors[candy.candyType - 1] || 0xffffff;
// Create 8-12 particles per candy
var particleCount = Math.floor(Math.random() * 5) + 8;
for (var p = 0; p < particleCount; p++) {
var particle = new Particle(particleColor, candy.x, candy.y);
particles.push(particle);
game.addChild(particle);
}
candy.markForRemoval();
gameGrid[candy.gridX][candy.gridY] = null;
// Update score with animation
var oldScore = score;
score += 100;
if (matches.length > 3) {
score += (matches.length - 3) * 50;
}
// Animate score increase
var scoreIncrease = score - oldScore;
var tempScore = oldScore;
tween({
score: tempScore
}, {
score: score
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
scoreText.setText('Score: ' + score);
}
});
// Update score display during animation
var scoreAnimationTimer = LK.setInterval(function () {
tempScore += scoreIncrease / 30; // 30 steps over 500ms
if (tempScore >= score) {
tempScore = score;
LK.clearInterval(scoreAnimationTimer);
}
scoreText.setText('Score: ' + Math.floor(tempScore));
}, 16); // ~60fps
// Increment combo counter
currentCombo++;
// Show combo text based on match size and combo count
var comboMessage = "";
var comboColor = 0xFFFFFF;
if (matches.length >= 5) {
comboMessage = "Fantastic!";
comboColor = 0xFF6B6B;
// Screen shake for 5+ matches
var shakeIntensity = 15;
var originalX = game.x;
var originalY = game.y;
tween(game, {
x: originalX + shakeIntensity,
y: originalY + shakeIntensity * 0.5
}, {
duration: 50,
onFinish: function onFinish() {
tween(game, {
x: originalX - shakeIntensity,
y: originalY - shakeIntensity * 0.5
}, {
duration: 50,
onFinish: function onFinish() {
tween(game, {
x: originalX + shakeIntensity * 0.5,
y: originalY + shakeIntensity
}, {
duration: 50,
onFinish: function onFinish() {
tween(game, {
x: originalX,
y: originalY
}, {
duration: 50
});
}
});
}
});
}
});
} else if (matches.length >= 4) {
comboMessage = "Awesome!";
comboColor = 0x4ECDC4;
// Screen shake for 4+ matches
var shakeIntensity = 10;
var originalX = game.x;
var originalY = game.y;
tween(game, {
x: originalX + shakeIntensity,
y: originalY
}, {
duration: 75,
onFinish: function onFinish() {
tween(game, {
x: originalX - shakeIntensity,
y: originalY
}, {
duration: 75,
onFinish: function onFinish() {
tween(game, {
x: originalX,
y: originalY
}, {
duration: 75
});
}
});
}
});
} else if (currentCombo >= 3) {
comboMessage = "Great Combo!";
comboColor = 0xF9CA24;
// Light screen shake for combo
var shakeIntensity = 5;
var originalX = game.x;
var originalY = game.y;
tween(game, {
x: originalX + shakeIntensity
}, {
duration: 100,
onFinish: function onFinish() {
tween(game, {
x: originalX - shakeIntensity
}, {
duration: 100,
onFinish: function onFinish() {
tween(game, {
x: originalX
}, {
duration: 100
});
}
});
}
});
} else if (currentCombo >= 2) {
comboMessage = "Great!";
comboColor = 0x45B7D1;
}
if (comboMessage !== "") {
var comboX = 2048 / 2;
var comboY = GRID_START_Y + GRID_SIZE * CELL_SIZE / 2;
var comboText = new ComboText(comboMessage, comboX, comboY, comboColor);
comboTexts.push(comboText);
game.addChild(comboText);
}
}
// Remove candies after animation
LK.setTimeout(function () {
for (var i = 0; i < matches.length; i++) {
matches[i].destroy();
}
applyGravity();
}, 250);
}
function applyGravity() {
var needsGravity = false;
// Apply gravity physics - make candies fall to fill empty spaces
for (var x = 0; x < GRID_SIZE; x++) {
// Collect all candies in this column that are not null
var candiesInColumn = [];
for (var y = 0; y < GRID_SIZE; y++) {
if (gameGrid[x][y] !== null) {
candiesInColumn.push({
candy: gameGrid[x][y],
originalY: y
});
}
gameGrid[x][y] = null; // Clear the column
}
// Place candies back starting from bottom
var newY = GRID_SIZE - 1;
for (var i = candiesInColumn.length - 1; i >= 0; i--) {
var candyData = candiesInColumn[i];
var candy = candyData.candy;
var originalY = candyData.originalY;
gameGrid[x][newY] = candy;
// Immediately update grid position to prevent overlaps
candy.gridX = x;
candy.gridY = newY;
// Check if candy needs to fall
if (newY !== originalY) {
var targetY = GRID_START_Y + newY * CELL_SIZE + CELL_SIZE / 2;
candy.isAnimating = true;
animatingCandies++;
tween(candy, {
y: targetY
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
candy.isAnimating = false;
animatingCandies--;
}
});
needsGravity = true;
} else {
// Ensure position is correct even if not animating
candy.x = GRID_START_X + x * CELL_SIZE + CELL_SIZE / 2;
candy.y = GRID_START_Y + newY * CELL_SIZE + CELL_SIZE / 2;
}
newY--;
}
// Fill remaining empty spaces at top with new candies
for (var y = 0; y < GRID_SIZE; y++) {
if (gameGrid[x][y] === null) {
var newCandy = createCandy(x, y, getRandomCandyType());
newCandy.y = GRID_START_Y - CELL_SIZE + CELL_SIZE / 2;
newCandy.isAnimating = true;
animatingCandies++;
var targetY = GRID_START_Y + y * CELL_SIZE + CELL_SIZE / 2;
tween(newCandy, {
y: targetY
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
newCandy.isAnimating = false;
animatingCandies--;
}
});
needsGravity = true;
}
}
}
if (needsGravity) {
LK.getSound('cascade').play();
LK.setTimeout(function () {
checkForNewMatches();
}, 400);
}
}
function checkForNewMatches() {
if (animatingCandies > 0) {
LK.setTimeout(checkForNewMatches, 100);
return;
}
var matches = findMatches();
if (matches.length > 0) {
removeMatches(matches);
} else {
isProcessing = false;
currentCombo = 0; // Reset combo counter when no more matches
}
}
function checkGameState() {
// Endless game - no win/lose conditions
}
function processMove(candy1, candy2) {
if (isProcessing || !candy1 || !candy2 || candy1 === candy2) return false;
if (!areAdjacent(candy1, candy2)) return false;
isProcessing = true;
// Endless game - no move limit
// Temporarily swap to check for matches
var tempX1 = candy1.gridX,
tempY1 = candy1.gridY;
var tempX2 = candy2.gridX,
tempY2 = candy2.gridY;
gameGrid[tempX1][tempY1] = candy2;
gameGrid[tempX2][tempY2] = candy1;
candy1.gridX = tempX2;
candy1.gridY = tempY2;
candy2.gridX = tempX1;
candy2.gridY = tempY1;
var matches = findMatches();
if (matches.length > 0) {
// Valid move - perform the swap animation
swapCandies(candy2, candy1); // Swap back positions for animation
LK.setTimeout(function () {
removeMatches(matches);
}, 350);
} else {
// Invalid move - revert
gameGrid[tempX1][tempY1] = candy1;
gameGrid[tempX2][tempY2] = candy2;
candy1.gridX = tempX1;
candy1.gridY = tempY1;
candy2.gridX = tempX2;
candy2.gridY = tempY2;
// Animate back to original positions
swapCandies(candy1, candy2);
LK.setTimeout(function () {
isProcessing = false;
}, 350);
// Endless game - no move limit
}
return true;
}
game.down = function (x, y, obj) {
if (isProcessing) return;
var candy = getCandyAt(x, y);
if (!candy) return;
if (selectedCandy) {
if (selectedCandy === candy) {
// Deselect
tween(selectedCandy, {
scaleX: 1,
scaleY: 1
}, {
duration: 150
});
selectedCandy = null;
} else {
// Try to make move
var success = processMove(selectedCandy, candy);
if (success) {
tween(selectedCandy, {
scaleX: 1,
scaleY: 1
}, {
duration: 150
});
selectedCandy = null;
}
}
} else {
// Select candy
selectedCandy = candy;
tween(candy, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 150
});
}
};
// Create coffee cup below the grid
var coffee = LK.getAsset('coffee', {
anchorX: 0.5,
anchorY: 0.5
});
coffee.x = 2048 / 2;
coffee.y = GRID_START_Y + GRID_SIZE * CELL_SIZE + 150;
game.addChild(coffee);
// Coffee click handler
coffee.down = function (x, y, obj) {
// Play coffee sound
LK.getSound('coffee').play();
// Shake animation
tween(coffee, {
x: coffee.x + 10
}, {
duration: 50,
onFinish: function onFinish() {
tween(coffee, {
x: coffee.x - 20
}, {
duration: 50,
onFinish: function onFinish() {
tween(coffee, {
x: coffee.x + 10
}, {
duration: 50
});
}
});
}
});
};
// Start background music
LK.playMusic('rahat');
// Initialize the game
initializeGrid();
game.update = function () {
// Update particles
for (var i = particles.length - 1; i >= 0; i--) {
particles[i].update();
}
// Combo texts are automatically managed by their own animations
// No manual update needed as they self-destruct
// Background is now static image - no animation needed
// Continuously check for physics updates when not processing moves
if (!isProcessing && animatingCandies === 0) {
// Check if any candies need to fall due to physics
var needsPhysicsUpdate = false;
for (var x = 0; x < GRID_SIZE && !needsPhysicsUpdate; x++) {
// Check entire column from bottom to top for any candy that should fall
for (var y = GRID_SIZE - 1; y >= 0; y--) {
if (gameGrid[x][y] === null) {
// Found empty space, check if there's a candy above it
for (var checkY = y - 1; checkY >= 0; checkY--) {
if (gameGrid[x][checkY] !== null) {
needsPhysicsUpdate = true;
break;
}
}
if (needsPhysicsUpdate) break;
}
}
}
if (needsPhysicsUpdate) {
applyGravity();
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -156,11 +156,9 @@
var gameGrid = [];
var candyTypes = [1, 2, 3, 4, 5, 6];
var selectedCandy = null;
var isProcessing = false;
-var currentLevel = storage.currentLevel || 1;
-var movesLeft = 20;
-var targetScore = currentLevel * 1000;
+var movesLeft = 999999;
var score = 0;
var animatingCandies = 0;
var particles = [];
var comboTexts = [];
@@ -172,37 +170,14 @@
gameGrid[x][y] = null;
}
}
// UI Elements
-var scoreText = new Text2('Puan: 0', {
+var scoreText = new Text2('Score: 0', {
size: 80,
fill: 0xFFFFFF
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
-var targetText = new Text2('Hedef: ' + targetScore, {
- size: 60,
- fill: 0xFFFF99
-});
-targetText.anchor.set(0, 0);
-targetText.x = 50;
-targetText.y = 100;
-LK.gui.topLeft.addChild(targetText);
-var movesText = new Text2('Hamle: ' + movesLeft, {
- size: 60,
- fill: 0x99FFFF
-});
-movesText.anchor.set(1, 0);
-movesText.x = -50;
-movesText.y = 100;
-LK.gui.topRight.addChild(movesText);
-var levelText = new Text2('Seviye ' + currentLevel, {
- size: 70,
- fill: 0xFFFFFF
-});
-levelText.anchor.set(0.5, 0);
-levelText.y = 100;
-LK.gui.top.addChild(levelText);
// Create background image
var backgroundImage = LK.getAsset('background', {
anchorX: 0.5,
anchorY: 0.5
@@ -407,9 +382,9 @@
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
- scoreText.setText('Puan: ' + score);
+ scoreText.setText('Score: ' + score);
}
});
// Update score display during animation
var scoreAnimationTimer = LK.setInterval(function () {
@@ -417,9 +392,9 @@
if (tempScore >= score) {
tempScore = score;
LK.clearInterval(scoreAnimationTimer);
}
- scoreText.setText('Puan: ' + Math.floor(tempScore));
+ scoreText.setText('Score: ' + Math.floor(tempScore));
}, 16); // ~60fps
// Increment combo counter
currentCombo++;
// Show combo text based on match size and combo count
@@ -627,23 +602,15 @@
currentCombo = 0; // Reset combo counter when no more matches
}
}
function checkGameState() {
- if (score >= targetScore) {
- currentLevel++;
- storage.currentLevel = currentLevel;
- LK.getSound('yeaahh').play();
- LK.showYouWin();
- } else if (movesLeft <= 0) {
- LK.showGameOver();
- }
+ // Endless game - no win/lose conditions
}
function processMove(candy1, candy2) {
if (isProcessing || !candy1 || !candy2 || candy1 === candy2) return false;
if (!areAdjacent(candy1, candy2)) return false;
isProcessing = true;
- movesLeft--;
- movesText.setText('Hamle: ' + movesLeft);
+ // Endless game - no move limit
// Temporarily swap to check for matches
var tempX1 = candy1.gridX,
tempY1 = candy1.gridY;
var tempX2 = candy2.gridX,
@@ -673,10 +640,9 @@
swapCandies(candy1, candy2);
LK.setTimeout(function () {
isProcessing = false;
}, 350);
- movesLeft++; // Give back the move
- movesText.setText('Hamle: ' + movesLeft);
+ // Endless game - no move limit
}
return true;
}
game.down = function (x, y, obj) {
gerçekçi bir şeker. yuvarlak bir şeker ve kırmızı renk. In-Game asset. 2d. High contrast. No shadows
gerçekçi bir şeker. yuvarlak bir şeker ve pembe renk.. In-Game asset. 2d. High contrast. No shadows
gerçekçi bir şeker. yuvarlak bir şeker ve koyu mavi renk. aynı candy2 deki gibi In-Game asset. 2d. High contrast. No shadows
gerçekçi bir şeker. yuvarlak bir şeker ve sarı renk. aynı candy2 deki gibi olsun. In-Game asset. 2d. High contrast. No shadows
gerçekçi bir şeker. yuvarlak bir şeker ve kahverengi renk. aynı candy2 deki gibi olsun. In-Game asset. 2d. High contrast. No shadows
gerçekçi bir şeker. yuvarlak bir şeker ve yeşil renk. aynı candy2 deki gibi olsun. In-Game asset. 2d. High contrast. No shadows
a coffee. In-Game asset. 2d. High contrast. No shadows
Bir satırda oyundaki tüm şekerler yan yana dizilsin. In-Game asset. 2d. High contrast. No shadows
Yuvarlak bir şeker ve üstünde ona ucu değen sağ üstte bir kalem. In-Game asset. 2d. High contrast. No shadows