User prompt
Ninja yıldızını oyundan tamamen kaldır
User prompt
Bomba sesi değil başka bir ses oluştur. Ninjahitstar 2 oluştur
User prompt
Ninja yıldızına değildinde bir ses daha çıksın
User prompt
Aynı bombada olduğu gibi ninja yıldızına değildinde ekrana kırmızı efekt gelsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ninja yıldızına değildinde 1 can azalsın
User prompt
Ninja, ninja yıldızına çarptığında efekt çıksın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ninja, ninja yıldızlarına değerse ses çıkarsın.
User prompt
Oyunda bazen ninja yıldızları da düşsün. Ninja eğer onlara değerse -50 puan alsın.
User prompt
Ninjanın canı bittiğinde ses çıkarsın.
User prompt
Ninja sağlık kitini aldığında bir ses çıksın.
User prompt
Oyunda nadiren yukarıdan sağlık kitleri düşsün. Ninja bir sağlık kiti aldığında bir can kazansın. Makas 5 cana kadar ulaşabilir. Ayrıca sağlık kitleri aşağıya düştüğünde puan azaltmayacak veya puan kazandırmayacak.
User prompt
Oyuna bir can mekanizması ekleyelim. Ninja meyveleri yakalayamadığında 1 canı gitsin. Ninja bombalara çarptığında 1 canı gitsin. Ninjanın toplam 5 canı olsun. Can sayısı sağ üstte gözüksün.
User prompt
Bombalar aşağıya düştüğünde ses çıkarmasın.
User prompt
Meyveler aşağıya düştüğünde bir ses çıkarsın.
User prompt
Ninja karpuza değdiğinde 20 puan kazansın.
User prompt
Oyuna meyve olarak karpuz da ekleyelim.Karpuz diğer meyvelere göre 2 kat daha hızlı düşsün. Ayrıca her 5 saniyede bir karpuz düşsün. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyun başladığında Backgroundmusic çalmaya başlasın.
User prompt
Oyunu açar açmaz düşen ejderha meyvesini kaldır.
User prompt
Oyuna başlar başlamaz bir ejderha meyvesi düşüyor. Oyunun ilk 10 saniyesinde sonra ejderha meyveleri düşmeye başlasın.
User prompt
Oyuna bir ejderha meyvesi ekleyelim. Ninja ejderha meyvesini aldığında 50 puan kazansın. Fakat ejderha meyvesi diğer meyvelere göre 2 kat daha hızlı düşsün. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyunda 2 dk süreli bir süre sayacı olsun.
User prompt
Ninja bombaya değdiğinde "ah!" Diye ses çıkarsın.
User prompt
Ninja bombaya dediğinde bombada patlama efekti olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Meyveleri aldığımızda efekt çıksın ve ses çıksın. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Score sayacının yazı fontunu japonya stili şeklinde yapalım ama japonca yapma.
/****
* 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.fallSpeed = 25 + Math.random() * 15;
self.penalty = 100;
self.update = function () {
self.y += self.fallSpeed;
};
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.fallSpeed = 18 + Math.random() * 12;
self.points = 10;
self.fruitType = fruitType;
self.update = function () {
self.y += self.fallSpeed;
};
return self;
});
var Ninja = Container.expand(function () {
var self = Container.call(this);
var ninjaGraphics = self.attachAsset('ninja', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 8;
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
// Add wooden background
var woodenBg = game.addChild(LK.getAsset('woodenBackground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
}));
// Add wooden platform
var woodenPlatform = game.addChild(LK.getAsset('woodenPlatform', {
anchorX: 0.5,
anchorY: 1,
x: 2048 / 2,
y: 2732 - 50
}));
var ninja = game.addChild(new Ninja());
ninja.x = 2048 / 2;
ninja.y = 2732 - 350; // Position ninja higher above the platform
var fruits = [];
var bombs = [];
var fruitTypes = ['apple', 'banana', 'orange', 'grape'];
var spawnTimer = 0;
var spawnInterval = 120;
var bombSpawnTimer = 0;
var bombSpawnInterval = 300;
var difficultyTimer = 0;
var scoreTxt = new Text2('Score: 0', {
size: 100,
fill: 0xFFFFFF,
font: "Impact, 'Arial Black', Tahoma"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var dragNode = null;
function handleMove(x, y, obj) {
if (dragNode) {
dragNode.x = x;
if (dragNode.x < 180) dragNode.x = 180;
if (dragNode.x > 2048 - 180) dragNode.x = 2048 - 180;
}
}
game.move = handleMove;
game.down = function (x, y, obj) {
dragNode = ninja;
handleMove(x, y, obj);
};
game.up = function (x, y, obj) {
dragNode = null;
};
function spawnFruit() {
var randomType = fruitTypes[Math.floor(Math.random() * fruitTypes.length)];
var newFruit = game.addChild(new Fruit(randomType));
newFruit.x = 100 + Math.random() * (2048 - 200);
newFruit.y = -50;
newFruit.lastY = newFruit.y;
newFruit.lastIntersecting = false;
fruits.push(newFruit);
}
function spawnBomb() {
var newBomb = game.addChild(new Bomb());
newBomb.x = 100 + Math.random() * (2048 - 200);
newBomb.y = -50;
newBomb.lastY = newBomb.y;
newBomb.lastIntersecting = false;
bombs.push(newBomb);
}
game.update = function () {
spawnTimer++;
bombSpawnTimer++;
difficultyTimer++;
// Increase difficulty over time
if (difficultyTimer % 1800 == 0 && spawnInterval > 30) {
spawnInterval -= 5;
}
// Spawn fruits with increasing frequency
var fruitsToSpawn = 1;
if (difficultyTimer > 3600) fruitsToSpawn = 2; // After 1 minute, spawn 2 fruits
if (difficultyTimer > 7200) fruitsToSpawn = 3; // After 2 minutes, spawn 3 fruits
if (difficultyTimer > 10800) fruitsToSpawn = 4; // After 3 minutes, spawn 4 fruits
if (spawnTimer >= spawnInterval) {
for (var j = 0; j < fruitsToSpawn; j++) {
spawnFruit();
}
spawnTimer = 0;
}
// Spawn bombs occasionally
if (bombSpawnTimer >= bombSpawnInterval) {
spawnBomb();
bombSpawnTimer = 0;
}
// Update fruits
for (var i = fruits.length - 1; i >= 0; i--) {
var fruit = fruits[i];
// Check if fruit went off screen
if (fruit.lastY < 2732 + 100 && fruit.y >= 2732 + 100) {
// Penalty for missing fruit
LK.setScore(LK.getScore() - 50);
scoreTxt.setText('Score: ' + LK.getScore());
fruit.destroy();
fruits.splice(i, 1);
continue;
}
// Check collision with ninja
var currentIntersecting = fruit.intersects(ninja);
if (!fruit.lastIntersecting && currentIntersecting) {
LK.setScore(LK.getScore() + fruit.points);
scoreTxt.setText('Score: ' + LK.getScore());
// Play catch sound effect
LK.getSound('fruitCatch').play();
// Enhanced visual feedback with bounce effect
tween(fruit, {
scaleX: 1.8,
scaleY: 1.8,
alpha: 0.3,
rotation: Math.PI
}, {
duration: 300,
easing: tween.bounceOut,
onFinish: function onFinish() {
fruit.destroy();
}
});
// Additional sparkle effect - create a brief flash
LK.effects.flashObject(fruit, 0xFFD700, 200);
fruits.splice(i, 1);
continue;
}
fruit.lastY = fruit.y;
fruit.lastIntersecting = currentIntersecting;
}
// Update bombs
for (var k = bombs.length - 1; k >= 0; k--) {
var bomb = bombs[k];
// Check if bomb went off screen
if (bomb.lastY < 2732 + 100 && bomb.y >= 2732 + 100) {
bomb.destroy();
bombs.splice(k, 1);
continue;
}
// Check collision with ninja
var bombIntersecting = bomb.intersects(ninja);
if (!bomb.lastIntersecting && bombIntersecting) {
LK.setScore(LK.getScore() - bomb.penalty);
scoreTxt.setText('Score: ' + LK.getScore());
// Play explosion sound effect
LK.getSound('bombExplosion').play();
// Play ninja pain sound
LK.getSound('ninjaPain').play();
// Enhanced explosion visual effects
tween(bomb, {
scaleX: 2.5,
scaleY: 2.5,
alpha: 0,
rotation: Math.PI * 2
}, {
duration: 400,
easing: tween.easeOut,
onFinish: function onFinish() {
bomb.destroy();
}
});
// Flash effect for bomb hit
LK.effects.flashScreen(0xFF0000, 500);
// Additional explosive flash effect on the bomb itself
LK.effects.flashObject(bomb, 0xFFFFFF, 300);
bombs.splice(k, 1);
continue;
}
bomb.lastY = bomb.y;
bomb.lastIntersecting = bombIntersecting;
}
};
LK.playMusic('bgmusic'); ===================================================================
--- original.js
+++ change.js
@@ -197,8 +197,10 @@
LK.setScore(LK.getScore() - bomb.penalty);
scoreTxt.setText('Score: ' + LK.getScore());
// Play explosion sound effect
LK.getSound('bombExplosion').play();
+ // Play ninja pain sound
+ LK.getSound('ninjaPain').play();
// Enhanced explosion visual effects
tween(bomb, {
scaleX: 2.5,
scaleY: 2.5,
An apple. 2d. High contrast. No shadows
Banana. 2d. High contrast. No shadows
An orange. 2d. High contrast. No shadows
A grape. 2d. High contrast. No shadows
Cute Ninja. 2d. High contrast. No shadows
Wooden Background
A bomb. In-Game asset. 2d. High contrast. No shadows
A dragonfruit. In-Game asset. 2d. High contrast. No shadows
Wooden platfom straigth. In-Game asset. 2d. High contrast. No shadows
A watermelon. In-Game asset. 2d. High contrast. No shadows
A health kit. In-Game asset. 2d. High contrast. No shadows