User prompt
arka plan daha parlak olsun
User prompt
oyuna başlandıktan sonra her dakika başı canavar ve coinlerin hızı biraz artsın 5.dakikada hız artısışı dursun
User prompt
oyuncu canı aldığında canavarla ilk temasında oyun bitmesin
User prompt
can coin ve canavarlar gibi hareket etsin
User prompt
Please fix the bug: 'ReferenceError: hearts is not defined' in or related to this line: 'hearts = hearts.filter(function (h) {' Line Number: 280
User prompt
canavarların olmadığı platformlarda nadir olacak şekilde can çıksın
User prompt
joker assetini kaldır
Code edit (1 edits merged)
Please save this source code
User prompt
joker assetini oyundan kaldır
User prompt
jokere dokunulduktan sonra oyuncu bir can kazansın ve ilk canavarla temasında oyun bitmesin
User prompt
when a minimum of one joker is collected, the first time the player touches the monster, the player does not get burned and the game continues, a joker asset in the lower right corner to show that the joker is owned, when the joker is used, the asset disappears until you get a new joker
User prompt
joker alındıktan sonra oyuncunun canavara ilk değişi geçersiz sayılsın ve oyun devam etsin
User prompt
Please fix the bug: 'TypeError: TypeError is not a constructor' in or related to this line: 'throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");' Line Number: 117
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: TypeError is not a constructor' in or related to this line: 'throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");' Line Number: 117
Code edit (1 edits merged)
Please save this source code
User prompt
jokere sahip olunduğunda sağ alt köşede joker asseti gözüksün joker kullanıldığında asset kaybolsun
User prompt
minimum 1 joker olduğunda oyuncu canavara değse bile oyun bitmesin
User prompt
joker coinlerle beraber nadiren çıksın
/**** * Classes ****/ var Coin = Container.expand(function () { var self = Container.call(this); self.attachAsset('coin', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 10; self.update = function () { self.x -= self.speed; if (self.x < -50) { self.destroy(); } }; return self; }); var Enemy = Container.expand(function () { var self = Container.call(this); self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.x -= self.speed; if (self.x < -50) { self.destroy(); } }; return self; }); var Platform = Container.expand(function () { var self = Container.call(this); self.attachAsset('platform', { anchorX: 0.5, anchorY: 0.5 }).alpha = 0.5; return self; }); var Player = Container.expand(function () { var self = Container.call(this); self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.jumpHeight = 40; self.isJumping = false; self.velocityY = 0; self.coinCount = 0; self.hasJokerImmunity = false; self.useJoker = function () { if (self.hasJokerImmunity) { self.hasJokerImmunity = false; jokerIcon.visible = false; } }; self.update = function () { if (self.isJumping) { self.y += self.velocityY; self.velocityY += 0.7; if (self.y >= 2732 / 2) { self.y = 2732 / 2; self.isJumping = false; self.velocityY = 0; } } }; self.jump = function () { if (!self.isJumping) { self.isJumping = true; self.velocityY = -self.jumpHeight; } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xADD8E6 }); /**** * Game Code ****/ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) { return _arrayLikeToArray(r, a); } var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) { return Array.from(r); } } function _arrayWithoutHoles(r) { if (Array.isArray(r)) { return _arrayLikeToArray(r); } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; } var background = game.addChild(LK.getAsset('background', { anchorX: 0, anchorY: 0 })); background.x = 0; background.y = 0; var platforms = []; for (var i = 1; i < 7; i++) { var platform = new Platform(); platform.x = 2048 / 2; platform.y = 2732 / 7 * i; platforms.push(platform); game.addChild(platform); } var player = game.addChild(new Player()); player.currentPlatform = platforms[5]; player.y = player.currentPlatform.y - player.height + 100; player.x = 250; var enemies = []; var coins = []; var jokers = []; var coinCount = 0; var enemySpawnCounter = 0; var enemySpawnInterval = 100; var scoreText = new Text2('0', { size: 100, fill: 0xFFFFFF }); LK.gui.top.addChild(scoreText); scoreText.x = 2048 / 2; scoreText.y = 0; var coinText = new Text2('Coins: 0', { size: 80, fill: 0xFFFF00 }); LK.gui.bottom.addChild(coinText); coinText.x = 2048 / 2; coinText.y = 2732 - coinText.height; LK.playMusic('music'); LK.playMusic('music2'); function spawnCoinOnPlatform(platform) { var coin = new Coin(); coin.x = 2048; coin.y = platform.y - 150; game.addChild(coin); coins.push(coin); } function updatePlayer() { player.speed += 2; player.jumpHeight += 10; } game.update = function () { player.update(); if (LK.ticks % 3600 === 0 && LK.ticks <= 18000) { // Increase speed every minute until the 5th minute coins.forEach(function (c) { c.speed += 0.6; }); enemies.forEach(function (e) { e.speed += 0.6; }); } enemySpawnCounter++; if (enemySpawnCounter >= enemySpawnInterval && enemies.length === 0) { var usedPlatforms = []; var platformCount = LK.ticks < 900 ? 3 : LK.ticks < 2700 ? 4 : 5; for (var i = 0; i < platformCount; i++) { var enemy = new Enemy(); enemy.x = 2048; var idx; do { idx = Math.floor(Math.random() * platforms.length); } while (usedPlatforms.includes(idx)); usedPlatforms.push(idx); enemy.y = platforms[idx].y - enemy.height + 50; enemies.push(enemy); game.addChild(enemy); } enemySpawnInterval = Math.floor(Math.random() * 200) + 50; enemySpawnCounter = 0; var coinPlatforms = Array.from(Array(6).keys()).filter(function (i) { return !usedPlatforms.includes(i); }); if (coinPlatforms.length > 0) { var coinIndex = coinPlatforms[Math.floor(Math.random() * coinPlatforms.length)]; spawnCoinOnPlatform(platforms[coinIndex]); } } enemies = enemies.filter(function (e) { e.update(); if (player.intersects(e)) { if (player.hasJokerImmunity) { player.useJoker(); } else if (player.lives > 1) { player.lives -= 1; // Decrease player's life } else { LK.getSound('enemySound').play(); LK.setTimeout(function () { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); }, 500); } } else if (player.x > e.x && !e.passed) { e.passed = true; LK.setScore(LK.getScore() + 1); scoreText.setText(LK.getScore()); } if (e.x < -50) { game.removeChild(e); return false; } return true; }); coins = coins.filter(function (c) { if (player.intersects(c)) { game.removeChild(c); coinCount += 5; coinText.setText('Coins: ' + coinCount); LK.setScore(LK.getScore() + 5); scoreText.setText('Best Score: ' + LK.getScore()); LK.getSound('coinSound').play(); if (coinCount >= 10) { updatePlayer(); } return false; } return true; }); }; game.down = function (x, y, obj) { var idx = platforms.indexOf(player.currentPlatform); player.currentPlatform = idx === 5 ? platforms[0] : platforms[idx + 1]; player.y = player.currentPlatform.y - player.height + 100; };
===================================================================
--- original.js
+++ change.js
@@ -80,9 +80,9 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x87CEEB
+ backgroundColor: 0xADD8E6
});
/****
* Game Code
korkunç kuş canavarı. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
coin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
gökyüzü kahramanı. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
sade gökyüzü
düz kırmızı kalp. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows