User prompt
Oyuncu kalkan aktifken 1. Mermidende etkilenmez
User prompt
Oyuncu elips ayakladı için varlık aç
User prompt
Oyuncu Elips ayakları kırmızı yap ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oluşturulan elips ayakların boyutunu biraz kücült ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oluşturulan elips ayaklarını arasındaki mesafeyi aç ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu yürüme efekti için alt kısı aşagı yukarı hareket ettir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'TypeError: setTimeout is not a function' in or related to this line: 'setTimeout(function () {' Line Number: 429
User prompt
Ayaklar aşagı yukarı titresin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Olmuyor ayaklar hızlı takip etmiyor ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ayaklar oyuncuyu takip etmekte zorlanıyor
User prompt
Eklenen ayak geç geliyor ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu hareket ayakladı biraz yukarı kaldır ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Biraz yukarı kaldır ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu için yürüme animasyonu ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık animasyonu etkisini büyğlt ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Biraz yukarı kaldır
User prompt
Oyuncu yürüme animasyonu için oyuncunun alt kısmına 2 tane elips yerleştir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık efekt konumunu biraz yukarı kaldır ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
1.mermi parcacık animasyonunda agız titreme ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık için renk varlıgı oluştur ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Parçacık efekti oyuncunun agız kısmında ortaya cıksın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu düşmanmermi temasında etrafa parçacılar dagılsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Asaga sola ve çapraz hareket etsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Kalkan aktif oldugunda nesne takibini sonlandır ve siyah göz bebegi beyaz gözün içinde saga sola çarpsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Kalkan aktif oldugunda nesne göz bebegi takibi iptal olsun ve kalkan süresince göz bebekleri 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 with walking motion (horizontal and vertical) tween(leftLeg, { x: leftLeg.x === -80 ? -100 : -80, y: leftLeg.y === 200 ? 180 : 200 }, { duration: 200, easing: tween.easeInOut }); // Animate right leg with walking motion (opposite to left leg) tween(rightLeg, { x: rightLeg.x === 160 ? 180 : 160, y: rightLeg.y === 200 ? 180 : 200 }, { duration: 200, easing: tween.easeInOut }); } // Shooting logic self.shootTimer++; if (self.shootTimer >= self.shootInterval) { self.shootTimer = 0; // Randomly choose projectile type if (Math.random() > 0.5) { // Create regular projectile var projectile = new EnemyProjectile(); projectile.x = self.x; projectile.y = self.y + 50; enemyProjectiles.push(projectile); game.addChild(projectile); } else { // Create new projectile type var projectile2 = new EnemyProjectile2(); projectile2.x = self.x; projectile2.y = self.y + 50; enemyProjectiles2.push(projectile2); game.addChild(projectile2); } // Play enemy shooting sound LK.getSound('enemyShoot').play(); } }; return self; }); var EnemyProjectile = Container.expand(function () { var self = Container.call(this); var projectileBody = self.attachAsset('enemyProjectile', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.0, scaleY: 2.0 }); self.speed = 6; self.update = function () { self.y += self.speed; }; return self; }); var EnemyProjectile2 = Container.expand(function () { var self = Container.call(this); var projectileBody = self.attachAsset('enemyProjectile2', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); self.speed = 4; self.sideSpeed = 2; self.direction = Math.random() > 0.5 ? 1 : -1; self.update = function () { self.y += self.speed; self.x += self.sideSpeed * self.direction; // Bounce off screen edges if (self.x <= 0 || self.x >= 2048) { self.direction *= -1; } }; return self; }); var Particle = Container.expand(function () { var self = Container.call(this); // Choose random particle color/type var particleTypes = ['redParticle', 'orangeParticle', 'yellowParticle', 'whiteParticle', 'smoke']; var randomType = particleTypes[Math.floor(Math.random() * particleTypes.length)]; var particleBody = self.attachAsset(randomType, { anchorX: 0.5, anchorY: 0.5, scaleX: 0.3 + Math.random() * 0.6, scaleY: 0.3 + Math.random() * 0.6 }); // Random particle properties self.velocityX = (Math.random() - 0.5) * 8; self.velocityY = -Math.random() * 6 - 2; self.gravity = 0.2; self.life = 90 + Math.random() * 60; // 1.5-2.5 seconds at 60fps self.maxLife = self.life; self.update = function () { // Apply physics self.x += self.velocityX; self.y += self.velocityY; self.velocityY += self.gravity; // Fade out over time self.life--; self.alpha = self.life / self.maxLife; // Remove when life is over if (self.life <= 0) { self.destroy(); // Remove from particles array for (var p = particles.length - 1; p >= 0; p--) { if (particles[p] === self) { particles.splice(p, 1); break; } } } }; 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 }); // Create player feet var leftFoot = game.attachAsset('playerLeftFoot', { x: player.x - 80, y: player.y + 10, anchorX: 0.5, anchorY: 0.5, scaleX: 2.0, scaleY: 2.0 }); var rightFoot = game.attachAsset('playerRightFoot', { x: player.x + 80, y: player.y + 10, anchorX: 0.5, anchorY: 0.5, scaleX: 2.0, scaleY: 2.0 }); // Variables for player movement var playerSpeed = 8; var targetX = player.x; var isMoving = false; var playerLives = 3; var isShielded = false; var shieldTimer = 0; var shieldDuration = 240; // 4 seconds at 60fps var isFlying = false; // Track if player is currently flying after being hit var shieldBubble = null; // Shield bubble visual element var walkAnimationTimer = 0; // Timer for walking animation // Enemy and projectile tracking var enemy = null; var enemyProjectiles = []; var enemyProjectiles2 = []; var particles = []; // 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; } // Animate walking - move feet up and down alternately walkAnimationTimer++; if (walkAnimationTimer >= 10) { walkAnimationTimer = 0; // Animate left foot up and down tween(leftFoot, { y: leftFoot.y === player.y + 10 ? player.y - 10 : player.y + 10 }, { duration: 150, easing: tween.easeInOut }); // Animate right foot up and down (opposite to left foot) tween(rightFoot, { y: rightFoot.y === player.y + 10 ? player.y - 10 : player.y + 10 }, { duration: 150, easing: tween.easeInOut }); } } 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 feet positions to follow player leftFoot.x = player.x - 80; rightFoot.x = player.x + 80; // Reset feet position when not moving if (!isMoving) { leftFoot.y = player.y + 10; rightFoot.y = player.y + 10; } // Update shield system if (isShielded) { shieldTimer--; // Show shield bubble if not already visible if (!shieldBubble) { shieldBubble = game.attachAsset('shieldBubble', { x: player.x, y: player.y - 150, anchorX: 0.5, anchorY: 0.5, alpha: 0.1, tint: 0xffffff }); // Add pulsing animation to shield bubble tween(shieldBubble, { scaleX: 1.1, scaleY: 1.1, alpha: 0.2 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { if (shieldBubble) { tween(shieldBubble, { scaleX: 1.0, scaleY: 1.0, alpha: 0.05 }, { duration: 500, easing: tween.easeInOut }); } } }); } // Update shield bubble position to follow player if (shieldBubble) { shieldBubble.x = player.x; shieldBubble.y = player.y - 150; } // Flash player blue to indicate shield if (shieldTimer % 20 < 10) { player.tint = 0x00ffff; } else { player.tint = 0xffffff; } // Deactivate shield when timer expires if (shieldTimer <= 0) { isShielded = false; player.tint = 0xffffff; // Stop pupil spinning and reset rotation tween.stop(leftPupil, { rotation: true }); tween.stop(rightPupil, { rotation: true }); leftPupil.rotation = 0; rightPupil.rotation = 0; // Remove shield bubble if (shieldBubble) { shieldBubble.destroy(); shieldBubble = null; } } } // 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; // Keep pupils centered when not shielded, but track falling projectiles if (!isShielded) { // Default pupil positions (eye centers) var leftEyeCenterX = player.x - 50; var leftEyeCenterY = player.y - 245; var rightEyeCenterX = player.x + 10; var rightEyeCenterY = player.y - 245; // Maximum distance pupils can move from center var maxPupilDistance = 8; // Find closest falling projectile to track var closestProjectile = null; var closestDistance = Infinity; // Check all enemy projectiles for (var p = 0; p < enemyProjectiles.length; p++) { var proj = enemyProjectiles[p]; var distance = Math.sqrt(Math.pow(proj.x - player.x, 2) + Math.pow(proj.y - player.y, 2)); if (distance < closestDistance) { closestDistance = distance; closestProjectile = proj; } } // Check all enemy projectiles type 2 for (var p2 = 0; p2 < enemyProjectiles2.length; p2++) { var proj2 = enemyProjectiles2[p2]; var distance2 = Math.sqrt(Math.pow(proj2.x - player.x, 2) + Math.pow(proj2.y - player.y, 2)); if (distance2 < closestDistance) { closestDistance = distance2; closestProjectile = proj2; } } if (closestProjectile) { // Calculate angles from eye centers to the closest projectile var leftAngle = Math.atan2(closestProjectile.y - leftEyeCenterY, closestProjectile.x - leftEyeCenterX); var rightAngle = Math.atan2(closestProjectile.y - rightEyeCenterY, closestProjectile.x - rightEyeCenterX); // Position pupils within eye boundaries, tracking the projectile leftPupil.x = leftEyeCenterX + Math.cos(leftAngle) * maxPupilDistance; leftPupil.y = leftEyeCenterY + Math.sin(leftAngle) * maxPupilDistance; rightPupil.x = rightEyeCenterX + Math.cos(rightAngle) * maxPupilDistance; rightPupil.y = rightEyeCenterY + Math.sin(rightAngle) * maxPupilDistance; } else { // No projectiles to track, center pupils leftPupil.x = leftEyeCenterX; leftPupil.y = leftEyeCenterY; rightPupil.x = rightEyeCenterX; rightPupil.y = rightEyeCenterY; } } else { // When shield is active, make pupils move diagonally (down-left and diagonally) var leftEyeCenterX = player.x - 50; var leftEyeCenterY = player.y - 245; var rightEyeCenterX = player.x + 10; var rightEyeCenterY = player.y - 245; var maxBounceDistance = 12; // Use diagonal movement patterns based on time var bounceTime = LK.ticks * 0.12; // Create diagonal movements: down-left and cross-diagonal var bounceX = Math.sin(bounceTime) * maxBounceDistance; var bounceY = Math.cos(bounceTime * 0.8) * (maxBounceDistance * 0.7); // Position pupils with diagonal movement patterns leftPupil.x = leftEyeCenterX + bounceX; leftPupil.y = leftEyeCenterY + bounceY; rightPupil.x = rightEyeCenterX - bounceX; // Opposite X movement for variety rightPupil.y = rightEyeCenterY + bounceY; } // 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)) { // Check if player is protected by shield if (!isShielded) { // Award points when hit by enemy projectile LK.setScore(LK.getScore() + 10); // Play sound effect for first projectile hit LK.getSound('enemyProjectileHit').play(); // Create particle burst effect at player's mouth area for (var particleCount = 0; particleCount < 20; particleCount++) { var particle = new Particle(); particle.x = player.x + (Math.random() - 0.5) * 60; particle.y = player.y - 130 + (Math.random() - 0.5) * 40; // Position higher up from mouth area // Give particles much more dramatic spread velocity particle.velocityX = (Math.random() - 0.5) * 20; particle.velocityY = -Math.random() * 15 - 5; particles.push(particle); game.addChild(particle); } // Add mouth trembling effect during particle burst tween(player, { scaleX: player.scaleX + 0.2, scaleY: player.scaleY - 0.1 }, { duration: 80, easing: tween.easeInOut, onFinish: function onFinish() { tween(player, { scaleX: player.scaleX - 0.4, scaleY: player.scaleY + 0.2 }, { duration: 60, easing: tween.easeInOut, onFinish: function onFinish() { tween(player, { scaleX: 3.0, scaleY: 3.0 }, { duration: 100, easing: tween.easeOut }); } }); } }); } projectile.destroy(); enemyProjectiles.splice(i, 1); } } // Update enemy projectiles type 2 for (var j = enemyProjectiles2.length - 1; j >= 0; j--) { var projectile2 = enemyProjectiles2[j]; // Remove projectiles that go off screen if (projectile2.y > 2732 + 50 || projectile2.x < -100 || projectile2.x > 2148) { projectile2.destroy(); enemyProjectiles2.splice(j, 1); continue; } // Check collision with player if (projectile2.intersects(player) && !isShielded && !isFlying) { // Play sound effect for second projectile hit LK.getSound('enemyProjectile2Hit').play(); // Stop current player movement isMoving = false; // Set flying state to true isFlying = true; // Player flies off screen to the left while spinning tween(player, { x: -200, y: player.y - 800, rotation: Math.PI * 4 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { // Return player from right side after flying off player.x = 2248; player.y = 2682; player.rotation = 0; // Reset flying state isFlying = false; // Activate shield protection isShielded = true; shieldTimer = shieldDuration; // Shield bubble will be created in the shield update section // Animate player returning to screen tween(player, { x: 2048 / 2 }, { duration: 800, easing: tween.easeOut }); } }); // Update feet positions during flight animation tween(leftFoot, { x: -330, y: player.y - 790 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { leftFoot.x = 2168; leftFoot.y = 2692; tween(leftFoot, { x: 2048 / 2 - 80 }, { duration: 800, easing: tween.easeOut }); } }); tween(rightFoot, { x: -120, y: player.y - 790 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { rightFoot.x = 2128; rightFoot.y = 2692; tween(rightFoot, { x: 2048 / 2 + 80 }, { duration: 800, easing: tween.easeOut }); } }); // Update eye positions during flight animation tween(leftEye, { x: -250, y: player.y - 1045 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { leftEye.x = 2198; leftEye.y = 2437; tween(leftEye, { x: 2048 / 2 - 50 }, { duration: 800, easing: tween.easeOut }); } }); tween(rightEye, { x: -190, y: player.y - 1045 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { rightEye.x = 2258; rightEye.y = 2437; tween(rightEye, { x: 2048 / 2 + 10 }, { duration: 800, easing: tween.easeOut }); } }); tween(leftPupil, { x: -250, y: player.y - 1045 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { leftPupil.x = 2198; leftPupil.y = 2437; tween(leftPupil, { x: 2048 / 2 - 50 }, { duration: 800, easing: tween.easeOut }); } }); tween(rightPupil, { x: -190, y: player.y - 1045 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { rightPupil.x = 2258; rightPupil.y = 2437; tween(rightPupil, { x: 2048 / 2 + 10 }, { duration: 800, easing: tween.easeOut }); } }); // Create particle burst effect for (var particleCount = 0; particleCount < 25; particleCount++) { var particle = new Particle(); particle.x = player.x + (Math.random() - 0.5) * 80; particle.y = player.y - 50 + (Math.random() - 0.5) * 70; // Give particles more dramatic velocities for this bigger explosion particle.velocityX = (Math.random() - 0.5) * 18; particle.velocityY = -Math.random() * 12 - 4; particles.push(particle); game.addChild(particle); } // Create smoke and flame effects for (var smokeCount = 0; smokeCount < 8; smokeCount++) { var smoke = game.attachAsset('smoke', { x: player.x + (Math.random() - 0.5) * 200, y: player.y - 100 + (Math.random() - 0.5) * 100, anchorX: 0.5, anchorY: 0.5, alpha: 0.8 }); // Animate smoke rising and fading tween(smoke, { y: smoke.y - 200 - Math.random() * 100, alpha: 0, scaleX: 2 + Math.random(), scaleY: 2 + Math.random() }, { duration: 2000 + Math.random() * 1000, easing: tween.easeOut, onFinish: function onFinish() { smoke.destroy(); } }); } for (var flameCount = 0; flameCount < 6; flameCount++) { var flame = game.attachAsset('flame', { x: player.x + (Math.random() - 0.5) * 150, y: player.y - 50 + (Math.random() - 0.5) * 80, anchorX: 0.5, anchorY: 0.5, alpha: 1 }); // Animate flames flickering and rising tween(flame, { y: flame.y - 150 - Math.random() * 50, alpha: 0, scaleX: 1.5 + Math.random() * 0.5, scaleY: 1.5 + Math.random() * 0.5 }, { duration: 1500 + Math.random() * 500, easing: tween.easeOut, onFinish: function onFinish() { flame.destroy(); } }); } // Create fire animation effect on player tween(player, { tint: 0xff4500 }, { duration: 200, easing: tween.easeInOut, onFinish: function onFinish() { tween(player, { tint: 0xff0000 }, { duration: 200, easing: tween.easeInOut, onFinish: function onFinish() { tween(player, { tint: 0xffffff }, { duration: 300, easing: tween.easeOut }); } }); } }); // Reduce player lives playerLives--; if (playerLives <= 0) { // Show game over when no lives left LK.showGameOver(); } projectile2.destroy(); enemyProjectiles2.splice(j, 1); } } };
===================================================================
--- original.js
+++ change.js
@@ -479,49 +479,52 @@
continue;
}
// Check collision with player
if (projectile.intersects(player)) {
- // Award points when hit by enemy projectile
- LK.setScore(LK.getScore() + 10);
- // Play sound effect for first projectile hit
- LK.getSound('enemyProjectileHit').play();
- // Create particle burst effect at player's mouth area
- for (var particleCount = 0; particleCount < 20; particleCount++) {
- var particle = new Particle();
- particle.x = player.x + (Math.random() - 0.5) * 60;
- particle.y = player.y - 130 + (Math.random() - 0.5) * 40; // Position higher up from mouth area
- // Give particles much more dramatic spread velocity
- particle.velocityX = (Math.random() - 0.5) * 20;
- particle.velocityY = -Math.random() * 15 - 5;
- particles.push(particle);
- game.addChild(particle);
- }
- // Add mouth trembling effect during particle burst
- tween(player, {
- scaleX: player.scaleX + 0.2,
- scaleY: player.scaleY - 0.1
- }, {
- duration: 80,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- tween(player, {
- scaleX: player.scaleX - 0.4,
- scaleY: player.scaleY + 0.2
- }, {
- duration: 60,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- tween(player, {
- scaleX: 3.0,
- scaleY: 3.0
- }, {
- duration: 100,
- easing: tween.easeOut
- });
- }
- });
+ // Check if player is protected by shield
+ if (!isShielded) {
+ // Award points when hit by enemy projectile
+ LK.setScore(LK.getScore() + 10);
+ // Play sound effect for first projectile hit
+ LK.getSound('enemyProjectileHit').play();
+ // Create particle burst effect at player's mouth area
+ for (var particleCount = 0; particleCount < 20; particleCount++) {
+ var particle = new Particle();
+ particle.x = player.x + (Math.random() - 0.5) * 60;
+ particle.y = player.y - 130 + (Math.random() - 0.5) * 40; // Position higher up from mouth area
+ // Give particles much more dramatic spread velocity
+ particle.velocityX = (Math.random() - 0.5) * 20;
+ particle.velocityY = -Math.random() * 15 - 5;
+ particles.push(particle);
+ game.addChild(particle);
}
- });
+ // Add mouth trembling effect during particle burst
+ tween(player, {
+ scaleX: player.scaleX + 0.2,
+ scaleY: player.scaleY - 0.1
+ }, {
+ duration: 80,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(player, {
+ scaleX: player.scaleX - 0.4,
+ scaleY: player.scaleY + 0.2
+ }, {
+ duration: 60,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(player, {
+ scaleX: 3.0,
+ scaleY: 3.0
+ }, {
+ duration: 100,
+ easing: tween.easeOut
+ });
+ }
+ });
+ }
+ });
+ }
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