User prompt
make the boss asset move
User prompt
please make the boss asset bigger in size and shooting bullets
User prompt
Migrate to the latest version of LK
User prompt
make 3 boss assets and add them to the game
User prompt
make boss shoot rockets
User prompt
add a new asset called boss rockets
User prompt
health magement should be managed by game class
User prompt
make the game class handle the creation of lasers
User prompt
change the boss movement and fix the boss movement error
User prompt
Fix Bug: 'TypeError: LK.showWin is not a function' in this line: 'LK.showWin();' Line Number: 52
User prompt
Fix Bug: 'TypeError: LK.showVictory is not a function' in this line: 'LK.showVictory();' Line Number: 52
User prompt
Fix Bug: 'TypeError: LK.showWin is not a function' in this line: 'LK.showWin();' Line Number: 52
User prompt
Fix Bug: 'TypeError: LK.showWinScreen is not a function' in this line: 'LK.showWinScreen();' Line Number: 52
User prompt
Fix Bug: 'TypeError: LK.showWin is not a function' in this line: 'LK.showWin();' Line Number: 52
User prompt
make the boss fight the ninja hero and if the boss gets hit the player wins the game and if the player gets hit by the boss he loses and game over
User prompt
use the boss laser asset on the boss asset to launch rockets on the ninja hero and make the boss move rapidly while shooting boss laser
User prompt
change ninja laser asset to boss laser asset
User prompt
include levels to win
User prompt
let the boss shoot rocket bullets and move in rapid motion
User prompt
if the boss gets hit by ninja hero the player wins
User prompt
let the boss move in rapid direction shooting lasers
User prompt
let the ninja hero shoot lasers
User prompt
let the ninja hero have a highscore
User prompt
add a city asset background in future japan
User prompt
let the hero shoot ninja laser
var BossRocket = Container.expand(function () { var self = Container.call(this); var rocketGraphics = self.createAsset('bossRocket', 'Boss Rocket', .5, .5); self.speed = 15; self.move = function () { self.y += self.speed; }; }); var BossLaser = Container.expand(function () { var self = Container.call(this); var laserGraphics = self.createAsset('bossLaser', 'Boss Laser', .5, .5); self.speed = 10; self.move = function () { self.y += self.speed; }; }); var NinjaLaser = Container.expand(function () { var self = Container.call(this); var laserGraphics = self.createAsset('bossLaser', 'Boss Laser', .5, .5); self.speed = 20; self.move = function () { self.y -= self.speed; }; }); var Boss = Container.expand(function () { var self = Container.call(this); var bossGraphics = self.createAsset('boss', 'Evil Boss', .5, .5); self.health = 100; self.speed = 8; self.move = function () { var directions = ['left', 'right']; var direction = directions[Math.floor(Math.random() * directions.length)]; if (direction === 'left' && self.x > 0) { self.x -= self.speed * 2; } else if (direction === 'right' && self.x < 2048 - self.width) { self.x += self.speed * 2; } if (Math.random() < 0.5) { self.shootLaser(); } }; self.shootLaser = function () { var laser = new BossLaser(); laser.x = self.x; laser.y = self.y + self.height / 2; self.parent.bossLasers.push(laser); self.parent.addChild(laser); }; self.takeDamage = function (amount) { self.health -= amount; if (self.health <= 0) { LK.showWin(); self.destroy(); } }; }); var NinjaHero = Container.expand(function () { var self = Container.call(this); var ninjaGraphics = self.createAsset('ninjaHero', 'Ninja Hero', .5, .5); self.on('down', function () { self.throwLaser(); }); self.speed = 5; self.move = function (direction) { if (direction === 'left' && self.x > 0) self.x -= self.speed; else if (direction === 'right' && self.x < 2048 - self.width) self.x += self.speed; else if (direction === 'up' && self.y > 0) self.y -= self.speed; else if (direction === 'down' && self.y < 2732 - self.height) self.y += self.speed; }; self.throwLaser = function () { var laser = new NinjaLaser(); laser.x = self.x; laser.y = self.y - self.height / 2; self.parent.ninjaLasers.push(laser); self.parent.addChild(laser); LK.setScore(LK.getScore() + 10); }; }); var HeroBullet = Container.expand(function () { var self = Container.call(this); var bulletGraphics = self.createAsset('heroBullet', 'Hero Bullet', .5, .5); self.speed = 15; self.move = function () { self.y -= self.speed; }; }); var Game = Container.expand(function () { var self = Container.call(this); self.currentLevel = 1; self.maxLevel = 5; self.levelDifficulty = [1, 2, 3, 4, 5]; self.levelBossHealth = [100, 150, 200, 250, 300]; var cityBackground = self.createAsset('cityBackground', 'City Background', 0, 0); cityBackground.width = 2048; cityBackground.height = 2732; self.addChildAt(cityBackground, 0); var ninjaHero = self.addChild(new NinjaHero()); ninjaHero.x = 2048 / 2; ninjaHero.y = 2732 - ninjaHero.height; this.ninjaLasers = []; this.bossLasers = []; this.heroBullets = []; var boss = self.addChild(new Boss()); boss.x = 2048 / 2; boss.y = 100; boss.health = self.levelBossHealth[self.currentLevel - 1]; self.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); ninjaHero.x = pos.x; ninjaHero.y = pos.y; }); self.advanceLevel = function () { if (self.currentLevel < self.maxLevel) { self.currentLevel++; boss.health = self.levelBossHealth[self.currentLevel - 1]; } else { LK.showWin(); } }; LK.on('tick', function () { for (var i = self.ninjaLasers.length - 1; i >= 0; i--) { self.ninjaLasers[i].move(); if (self.ninjaLasers[i].y < -50) { self.ninjaLasers[i].destroy(); self.ninjaLasers.splice(i, 1); } else if (self.ninjaLasers[i].intersects(boss)) { boss.takeDamage(100); self.ninjaLasers[i].destroy(); self.ninjaLasers.splice(i, 1); } } for (var i = self.bossLasers.length - 1; i >= 0; i--) { self.bossLasers[i].move(); if (self.bossLasers[i].y > 2732) { self.bossLasers[i].destroy(); self.bossLasers.splice(i, 1); } else if (self.bossLasers[i].intersects(ninjaHero)) { LK.showGameOver(); self.bossLasers[i].destroy(); self.bossLasers.splice(i, 1); } } }); });
===================================================================
--- original.js
+++ change.js
@@ -48,9 +48,9 @@
};
self.takeDamage = function (amount) {
self.health -= amount;
if (self.health <= 0) {
- LK.showWinScreen();
+ LK.showWin();
self.destroy();
}
};
});
HERO IS A MASTER SAMURAI WARRIOR Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.RTX ON.INRECEDIBLE DETAIL.ULTRA HD .
future japan high graphics photo
a samurai sumo big in size. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a samurai sumo big in size. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.