User prompt
Please fix the bug: 'TypeError: LK.setHighScore is not a function' in or related to this line: 'LK.setHighScore(highestScore); // Update the highest score before ending the game' Line Number: 146
User prompt
Please fix the bug: 'LK.getHighScore is not a function' in or related to this line: 'var highestScore = LK.getHighScore() || 0; // Retrieve the highest score from the previous game' Line Number: 95
User prompt
high score sabit kalsın sıfırlanmasın
User prompt
oyunu tekrar oyna butonuna basıldığında high score tabelası sıfırlanmasın
User prompt
Please fix the bug: 'TypeError: LK.setHighScore is not a function' in or related to this line: 'LK.setHighScore(highestScore); // Update the highest score before ending the game' Line Number: 146
User prompt
Please fix the bug: 'LK.getHighScore is not a function' in or related to this line: 'var highestScore = LK.getHighScore(); // Retrieve the highest score from the previous game' Line Number: 95
User prompt
yeni oyuna başladığında high score tabelası sıfırlanmasın
User prompt
score tabelasında sadece score sayıları yazsın
User prompt
score tabelsını ekranın ortasına koy ve küçült
User prompt
high score tabelsının boyutunu küçült
User prompt
skor ve high skor tabelasını ekranın sağ üsütne alt alta sabitle
User prompt
high skor tabelası ekle
User prompt
en yüksek puan ekranda yazsın
User prompt
en yüksek skor hep sabit kalsın
User prompt
kutular hedefi geçerse veya çarparsa oyun bitsin
User prompt
skor tabelası ekle
User prompt
skor ekle
User prompt
her kutu kırıldığında skor saysın boss kırıldığında 50 puan fazladan eklesin
User prompt
atılan mermiler daha küçük olsun
User prompt
boos daha büyük ve yuvarlak olsun
User prompt
mause ile haraket ettirebileyim
Initial prompt
paint ball
/**** * Classes ****/ // Class for bullets var Bullet = Container.expand(function (startX, startY) { var self = Container.call(this); var bulletGraphics = self.attachAsset('bullet', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.5, scaleY: 0.5 }); self.x = startX; self.y = startY; self.speed = -10; self.update = function () { self.y += self.speed; if (self.y < -50) { self.destroy(); bullets.splice(bullets.indexOf(self), 1); } }; }); // Class for enemies var Enemy = Container.expand(function (type) { var self = Container.call(this); var enemyGraphics; if (type === 'boss') { enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5, scaleX: 2, scaleY: 2, shape: 'ellipse' }); } else { enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5 }); } self.x = Math.random() * 2048; self.y = -100; self.speed = 2 + level * 0.5; self.health = type === 'boss' ? 10 : 1; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.destroy(); enemies.splice(enemies.indexOf(self), 1); } }; }); //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Class for the player's paintball shooter var Shooter = Container.expand(function () { var self = Container.call(this); var shooterGraphics = self.attachAsset('shooter', { anchorX: 0.5, anchorY: 0.5 }); self.shoot = function () { var bullet = new Bullet(self.x, self.y); game.addChild(bullet); bullets.push(bullet); }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ var shooter = new Shooter(); shooter.x = 1024; shooter.y = 2500; game.addChild(shooter); var bullets = []; var enemies = []; var level = 1; var enemyCount = 0; game.update = function () { if (LK.ticks % 60 === 0) { if (enemyCount < 15) { var enemy = new Enemy('normal'); game.addChild(enemy); enemies.push(enemy); enemyCount++; } else if (enemyCount === 15) { var boss = new Enemy('boss'); game.addChild(boss); enemies.push(boss); enemyCount++; } } bullets.forEach(function (bullet) { bullet.update(); }); enemies.forEach(function (enemy) { enemy.update(); bullets.forEach(function (bullet) { if (bullet.intersects(enemy)) { enemy.health--; bullet.destroy(); bullets.splice(bullets.indexOf(bullet), 1); if (enemy.health <= 0) { enemy.destroy(); enemies.splice(enemies.indexOf(enemy), 1); if (enemyCount > 15) { level++; enemyCount = 0; } } } }); }); }; game.down = function (x, y, obj) { shooter.shoot(); }; game.move = function (x, y, obj) { shooter.x = x; };
===================================================================
--- original.js
+++ change.js
@@ -5,9 +5,11 @@
var Bullet = Container.expand(function (startX, startY) {
var self = Container.call(this);
var bulletGraphics = self.attachAsset('bullet', {
anchorX: 0.5,
- anchorY: 0.5
+ anchorY: 0.5,
+ scaleX: 0.5,
+ scaleY: 0.5
});
self.x = startX;
self.y = startY;
self.speed = -10;
bullet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
enemy. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
siyah arkaplan. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
siyah arkaplan. background. black