User prompt
bir yazi ekle text game overin uzerine ve yazi getor yazilsin
Code edit (1 edits merged)
Please save this source code
User prompt
if (player.intersects(enemy)) { LK.showGameOver(); LK.getSound('gamop').play(); if (score > highScore) { highScore = score; } scoreText.setText('Score: ' + score + '\nHigh Score: ' + highScore); scoreText.x = 2048 / 2; scoreText.y = 2732 / 2 + 200; // Ekranın ortasında göstermek için }
User prompt
game.down = function (x, y, obj) { player.jump(); for (var i = 0; i < enemies.length; i++) { var enemy = enemies[i]; var passedEnemy = player.y < enemy.y && player.x > enemy.x && player.x < enemy.x + enemy.width; if (passedEnemy) { score++; scoreText.setText('Score: ' + score); break; } } }; bunu ekle bakalim
User prompt
Honey, listen to me carefully. In games like Subway Surf or other games like Flabbybird etc., when we come to the Gameover screen, our score is shown. Please do that, do it properly.
User prompt
bu oyuna skor ekle artik
User prompt
ilk bastaki skor sistemin geri koy yerine
User prompt
halada gozukuyor duzmanin uzerinden her zipladimizda scoremiz 1 kere artsin
User prompt
benim oyunuma koymani istedim ama koymuyorsun bu oyuna koy o sistemi
User prompt
halada gozukmuyor
User prompt
skorumuz game overin altinde gozuksun
User prompt
hight score ekle ya
User prompt
scoremiz her dusmanin uzerinden atladimizda 1 artsin tm mi
User prompt
scor koy oyuna oyun bitdinde skorumuz gozyuksun mesala score=1
User prompt
kirmiz renkde textle yazilsiz skorumuzu
User prompt
halada gozukmuyo skorumuz text seklinde gozuksun olay again tusunun uzerinde
User prompt
onu bos ver skorumuz game over ekraninda gozuksun kac tane ennemyin uzerinden zepladik gozuksun
User prompt
dusmanlar bize deydiyiyinde gamop sesi calsin
User prompt
game over ekrani geldiyinde calsin
User prompt
didi muziyini oyuna koy sonsuz devam etsin
User prompt
ekranda gozuksun yada game over ekraninda
User prompt
hey score sayacin eklememisin scoremiz gorunmuyo
User prompt
Let's have a score counter, put a text under the pause button, score = 0 and every time we jump over the smoke, the 0 in our score will become +1 and it will appear.
User prompt
ve bu game over ekraninda play again tusunun uzerinde scorumuz gozukucek
User prompt
enemmyler playere deydinde game over ekranina aticak
/**** * Classes ****/ var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.x -= self.speed; }; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.jumpHeight = 40; self.isJumping = false; self.velocityY = 0; self.update = function () { // Yerçekimi self.velocityY += 0.8; self.y += self.velocityY; if (self.y > ground.y - self.height) { self.y = ground.y - self.height; self.velocityY = 0; self.isJumping = false; } }; self.jump = function () { if (!self.isJumping) { self.isJumping = true; self.velocityY = -self.jumpHeight; } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB, width: 8192, height: 10928 }); /**** * Game Code ****/ var background = game.addChild(LK.getAsset('background', { anchorX: 0.5, anchorY: 0.5, width: game.width, height: game.height })); background.x = game.width / 2; background.y = game.height / 2; LK.playMusic('didi', { loop: true }); var ground = game.addChild(LK.getAsset('ground', { anchorX: 0, anchorY: 1 })); ground.x = 0; ground.y = 2732 - 300; // Oyuncu var player = game.addChild(new Player()); player.x = 2048 / 2; player.y = ground.y - player.height - 420; // Düşmanlar var enemies = []; var enemySpawnInterval = 100; var enemySpawnCounter = 0; // Skorlar var score = 0; var highScore = 0; // Skor metni var scoreText = new Text2('Score: 0', { size: 100, fill: 0xFF0000 }); LK.gui.top.addChild(scoreText); scoreText.x = 2048 / 2; scoreText.y = 100; // Oyun güncellemesi game.update = function () { player.update(); // Düşman üretme enemySpawnCounter++; if (enemySpawnCounter >= enemySpawnInterval) { var enemy = new Enemy(); enemy.x = game.width; enemy.y = ground.y - enemy.height; enemies.push(enemy); game.addChild(enemy); enemySpawnInterval = Math.floor(Math.random() * 150) + 50; enemySpawnCounter = 0; } // Düşman güncelleme ve çarpışma kontrolü for (var i = 0; i < enemies.length; i++) { var enemy = enemies[i]; enemy.update(); if (player.intersects(enemy)) { LK.showGameOver(); LK.getSound('gamop').play(); if (score > highScore) { highScore = score; } scoreText.setText('GETOR\nScore: ' + score + '\nHigh Score: ' + highScore); scoreText.x = 2048 / 2; scoreText.y = 2732 / 2 + 200; } } }; // Oyuncu zıplarsa puan kazanma game.down = function (x, y, obj) { player.jump(); for (var i = 0; i < enemies.length; i++) { var enemy = enemies[i]; if (player.y < enemy.y && player.x > enemy.x && player.x < enemy.x + enemy.width) { score++; scoreText.setText('Score: ' + score); break; } } };
===================================================================
--- original.js
+++ change.js
@@ -112,9 +112,9 @@
LK.getSound('gamop').play();
if (score > highScore) {
highScore = score;
}
- scoreText.setText('Score: ' + score + '\nHigh Score: ' + highScore);
+ scoreText.setText('GETOR\nScore: ' + score + '\nHigh Score: ' + highScore);
scoreText.x = 2048 / 2;
scoreText.y = 2732 / 2 + 200;
}
}
guzel 2d bir arka plan bulutlu havalar arkada ucan kuslar ve bu 2d olucak. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. 2d
yuzu olan kizqin bir ates topu sinirli yakici ve pixelart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows