User prompt
Korunma kalkanı efectini kullan ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu ölüp geri geldikten sonra 2 saniye boyunca korunma kalkanına sahip olur ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık efektide ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık dagılmasıda ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Biraz daha yüksege fırlayıp gitsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu ikinci mermiye degdiginden oyun ekranından fırlayıp dönerek gitsin ve sonra ekrana sag taraftan dönsün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Duman ve alevde ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu 2.mermiye temas ederse yangın animasyonu olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
2.mermi temasında parçalanma efecti çıksın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
2.mermi temasında ateş ve parçacıklar etrafa saçılsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Eger oyuncu 2. Mermiye dokunursa alev animasyonu eklensin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
2. Mermi için patlama animasyonu ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncunun 3 canı olsun
User prompt
İkinci mermi için ses dosyası ekle
User prompt
Birinci mermi için ses varlıgı ekle
User prompt
Oluşturulan mermi çeşidi öldürücü
User prompt
Düşman için yeni mermi çeşidi ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Düşmanın mermisi oyuncuya puan kazandıroyor
User prompt
Oyuncu birinci mermiyi topladıgında puan kazansın
User prompt
Ölüm mermisi daha az yumurtlasın
User prompt
Düşman için yeni bir mermi varlıgı ekle bu mermi oyuncuyu öldürüyor
User prompt
Düşman için mermi çeşidi ekle 1. Mermi çeşidi puan kazandırırken oyuncu 2. Mermi çeşidine dokunursa ölüyor
User prompt
Düşman mermi resim varlıkları ekle
User prompt
Düşmanın alt kısmına yürüme animasyonu ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Elipsler aşagı yukarı degil saga sola titresin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Enemy = Container.expand(function () { var self = Container.call(this); // Create enemy visual using enemy image asset var enemyBody = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 0.5, scaleX: 4.0, scaleY: 4.0 }); // Create left leg var leftLeg = self.attachAsset('enemyLeg', { anchorX: 0.5, anchorY: 0, x: -80, y: 200 }); // Create right leg var rightLeg = self.attachAsset('enemyLeg', { anchorX: 0.5, anchorY: 0, x: 160, y: 200 }); self.speed = 3; self.direction = 1; self.shootTimer = 0; self.shootInterval = 90; // Shoot every 1.5 seconds at 60fps self.walkAnimationTimer = 0; self.update = function () { // Move horizontally self.x += self.speed * self.direction; // Bounce at screen edges if (self.x <= 100 || self.x >= 1948) { self.direction *= -1; } // Walking animation - alternate leg positions self.walkAnimationTimer++; if (self.walkAnimationTimer >= 15) { // Change leg position every 15 frames self.walkAnimationTimer = 0; // Animate left leg horizontally tween(leftLeg, { x: leftLeg.x === -80 ? -100 : -80 }, { duration: 200, easing: tween.easeInOut }); // Animate right leg horizontally (opposite to left leg) tween(rightLeg, { x: rightLeg.x === 160 ? 180 : 160 }, { duration: 200, easing: tween.easeInOut }); } // Shooting logic self.shootTimer++; if (self.shootTimer >= self.shootInterval) { self.shootTimer = 0; // Create projectile var projectile = new EnemyProjectile(); projectile.x = self.x; projectile.y = self.y + 50; enemyProjectiles.push(projectile); game.addChild(projectile); // Play enemy shooting sound LK.getSound('enemyShoot').play(); } }; return self; }); var EnemyProjectile = Container.expand(function () { var self = Container.call(this); var projectileBody = self.attachAsset('eye', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.0, scaleY: 2.0, tint: 0xff4444 }); self.speed = 6; self.update = function () { self.y += self.speed; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x8B4513 }); /**** * Game Code ****/ var backgroundImage = game.attachAsset('background', { x: 0, y: 0, width: 2048, height: 2732 }); // Add new background layer var backgroundLayer = game.attachAsset('backgroundLayer', { x: 0, y: 0, width: 2100, height: 700 }); // Create ground terrain var ground = game.attachAsset('ground', { x: 0, y: 2682, // Position at bottom (2732 - 50 = 2682) width: 2048, height: 50 }); // Create and position player on the ground var player = game.attachAsset('player', { x: 2048 / 2, // Center horizontally y: 2682, // Position touching the ground scaleX: 1.0, scaleY: 1.0, anchorX: 0.5, anchorY: 1.0 }); // Scale player to 3.0 using tween animation tween(player, { scaleX: 3.0, scaleY: 3.0 }, { duration: 500, easing: tween.easeOut }); // Create white eyes on the player var leftEye = game.attachAsset('eyeWhite', { x: player.x - 50, y: player.y - 245, anchorX: 0.5, anchorY: 0.5 }); var rightEye = game.attachAsset('eyeWhite', { x: player.x + 10, y: player.y - 245, anchorX: 0.5, anchorY: 0.5 }); // Create black pupils inside the white eyes var leftPupil = game.attachAsset('eye', { x: player.x - 50, y: player.y - 245, anchorX: 0.5, anchorY: 0.5 }); var rightPupil = game.attachAsset('eye', { x: player.x + 10, y: player.y - 245, anchorX: 0.5, anchorY: 0.5 }); // Variables for player movement var playerSpeed = 8; var targetX = player.x; var isMoving = false; // Enemy and projectile tracking var enemy = null; var enemyProjectiles = []; // Create enemy at top of screen enemy = game.addChild(new Enemy()); enemy.x = 1124; // Move slightly to the right enemy.y = 450; // Moved up from previous position // Touch/mouse controls for player movement game.down = function (x, y, obj) { // Set target position to touch/click location targetX = x; isMoving = true; // Keep player within screen bounds if (targetX < 0) targetX = 0; if (targetX > 2048) targetX = 2048; }; // Update player movement game.update = function () { if (isMoving) { // Calculate distance to target var distance = targetX - player.x; // Move towards target if (Math.abs(distance) > 5) { if (distance > 0) { player.x += playerSpeed; } else { player.x -= playerSpeed; } } else { // Snap to target when close enough player.x = targetX; isMoving = false; } // Keep player within bounds if (player.x < 0) player.x = 0; if (player.x > 2048) player.x = 2048; } // Update eye positions to follow player leftEye.x = player.x - 50; leftEye.y = player.y - 245; rightEye.x = player.x + 10; rightEye.y = player.y - 245; leftPupil.x = player.x - 50; leftPupil.y = player.y - 245; rightPupil.x = player.x + 10; rightPupil.y = player.y - 245; // Update enemy projectiles for (var i = enemyProjectiles.length - 1; i >= 0; i--) { var projectile = enemyProjectiles[i]; // Remove projectiles that go off screen if (projectile.y > 2732 + 50) { projectile.destroy(); enemyProjectiles.splice(i, 1); continue; } // Check collision with player if (projectile.intersects(player)) { // Flash screen red when hit LK.effects.flashScreen(0xff0000, 500); projectile.destroy(); enemyProjectiles.splice(i, 1); } } };
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Enemy = Container.expand(function () {
var self = Container.call(this);
// Create enemy visual using enemy image asset
var enemyBody = self.attachAsset('enemy', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 4.0,
scaleY: 4.0
});
// Create left leg
var leftLeg = self.attachAsset('enemyLeg', {
anchorX: 0.5,
anchorY: 0,
x: -80,
y: 200
});
// Create right leg
var rightLeg = self.attachAsset('enemyLeg', {
anchorX: 0.5,
anchorY: 0,
x: 160,
y: 200
});
self.speed = 3;
self.direction = 1;
self.shootTimer = 0;
self.shootInterval = 90; // Shoot every 1.5 seconds at 60fps
self.walkAnimationTimer = 0;
self.update = function () {
// Move horizontally
self.x += self.speed * self.direction;
// Bounce at screen edges
if (self.x <= 100 || self.x >= 1948) {
self.direction *= -1;
}
// Walking animation - alternate leg positions
self.walkAnimationTimer++;
if (self.walkAnimationTimer >= 15) {
// Change leg position every 15 frames
self.walkAnimationTimer = 0;
// Animate left leg horizontally
tween(leftLeg, {
x: leftLeg.x === -80 ? -100 : -80
}, {
duration: 200,
easing: tween.easeInOut
});
// Animate right leg horizontally (opposite to left leg)
tween(rightLeg, {
x: rightLeg.x === 160 ? 180 : 160
}, {
duration: 200,
easing: tween.easeInOut
});
}
// Shooting logic
self.shootTimer++;
if (self.shootTimer >= self.shootInterval) {
self.shootTimer = 0;
// Create projectile
var projectile = new EnemyProjectile();
projectile.x = self.x;
projectile.y = self.y + 50;
enemyProjectiles.push(projectile);
game.addChild(projectile);
// Play enemy shooting sound
LK.getSound('enemyShoot').play();
}
};
return self;
});
var EnemyProjectile = Container.expand(function () {
var self = Container.call(this);
var projectileBody = self.attachAsset('eye', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 2.0,
scaleY: 2.0,
tint: 0xff4444
});
self.speed = 6;
self.update = function () {
self.y += self.speed;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x8B4513
});
/****
* Game Code
****/
var backgroundImage = game.attachAsset('background', {
x: 0,
y: 0,
width: 2048,
height: 2732
});
// Add new background layer
var backgroundLayer = game.attachAsset('backgroundLayer', {
x: 0,
y: 0,
width: 2100,
height: 700
});
// Create ground terrain
var ground = game.attachAsset('ground', {
x: 0,
y: 2682,
// Position at bottom (2732 - 50 = 2682)
width: 2048,
height: 50
});
// Create and position player on the ground
var player = game.attachAsset('player', {
x: 2048 / 2,
// Center horizontally
y: 2682,
// Position touching the ground
scaleX: 1.0,
scaleY: 1.0,
anchorX: 0.5,
anchorY: 1.0
});
// Scale player to 3.0 using tween animation
tween(player, {
scaleX: 3.0,
scaleY: 3.0
}, {
duration: 500,
easing: tween.easeOut
});
// Create white eyes on the player
var leftEye = game.attachAsset('eyeWhite', {
x: player.x - 50,
y: player.y - 245,
anchorX: 0.5,
anchorY: 0.5
});
var rightEye = game.attachAsset('eyeWhite', {
x: player.x + 10,
y: player.y - 245,
anchorX: 0.5,
anchorY: 0.5
});
// Create black pupils inside the white eyes
var leftPupil = game.attachAsset('eye', {
x: player.x - 50,
y: player.y - 245,
anchorX: 0.5,
anchorY: 0.5
});
var rightPupil = game.attachAsset('eye', {
x: player.x + 10,
y: player.y - 245,
anchorX: 0.5,
anchorY: 0.5
});
// Variables for player movement
var playerSpeed = 8;
var targetX = player.x;
var isMoving = false;
// Enemy and projectile tracking
var enemy = null;
var enemyProjectiles = [];
// Create enemy at top of screen
enemy = game.addChild(new Enemy());
enemy.x = 1124; // Move slightly to the right
enemy.y = 450; // Moved up from previous position
// Touch/mouse controls for player movement
game.down = function (x, y, obj) {
// Set target position to touch/click location
targetX = x;
isMoving = true;
// Keep player within screen bounds
if (targetX < 0) targetX = 0;
if (targetX > 2048) targetX = 2048;
};
// Update player movement
game.update = function () {
if (isMoving) {
// Calculate distance to target
var distance = targetX - player.x;
// Move towards target
if (Math.abs(distance) > 5) {
if (distance > 0) {
player.x += playerSpeed;
} else {
player.x -= playerSpeed;
}
} else {
// Snap to target when close enough
player.x = targetX;
isMoving = false;
}
// Keep player within bounds
if (player.x < 0) player.x = 0;
if (player.x > 2048) player.x = 2048;
}
// Update eye positions to follow player
leftEye.x = player.x - 50;
leftEye.y = player.y - 245;
rightEye.x = player.x + 10;
rightEye.y = player.y - 245;
leftPupil.x = player.x - 50;
leftPupil.y = player.y - 245;
rightPupil.x = player.x + 10;
rightPupil.y = player.y - 245;
// Update enemy projectiles
for (var i = enemyProjectiles.length - 1; i >= 0; i--) {
var projectile = enemyProjectiles[i];
// Remove projectiles that go off screen
if (projectile.y > 2732 + 50) {
projectile.destroy();
enemyProjectiles.splice(i, 1);
continue;
}
// Check collision with player
if (projectile.intersects(player)) {
// Flash screen red when hit
LK.effects.flashScreen(0xff0000, 500);
projectile.destroy();
enemyProjectiles.splice(i, 1);
}
}
};
3d köstebek. In-Game asset. 2d. High contrast. No shadows
Elinde havuç olan kızgın bir çiftçi. Karakter ayakkabısı siyah
Havuç. In-Game asset. 2d. High contrast. No shadows
Bomba. In-Game asset. 2d. High contrast. No shadows
Alev. In-Game asset. 2d. High contrast. No shadows
Agız. In-Game asset. 2d. High contrast. No shadows
Kalp 3d. In-Game asset. 2d. High contrast. No shadows