User prompt
Invert movement of backgrouns
User prompt
Move background downwards generating feeling of movement. Make sure backrgrouns re spwans
User prompt
Hero should be on top of bullen on z axis
User prompt
Move hero bullet 10 pixel away from hero
User prompt
Hero bullet can triple its size when growing
User prompt
Center bullet with hero
User prompt
Rotate hero 90 degrees left on game start
User prompt
Add enemy life to enemy
User prompt
Herobullet should notnstart decreasing size
User prompt
Enemies should also have a gentle movement from side to aide
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'x')' in this line: 'var dx = this.hero.x - self.x;' Line Number: 28
User prompt
Fix Bug: 'ReferenceError: hero is not defined' in this line: 'var dx = hero.x - self.x;' Line Number: 28
User prompt
Fix Bug: 'ReferenceError: hero is not defined' in this line: 'var dx = hero.x - self.x;' Line Number: 28
User prompt
After spawning enemies should move towards rhe hero
User prompt
Enemies should move towards the hero
User prompt
When bullet collides with enemy enemy should be destoyed
User prompt
Make sure enemies are appearing on tick. Spwaninf regularly
User prompt
Add enemies movement on ti k
User prompt
Enemies should move downwards towards the hero
User prompt
Enemies should spawn from the top of the acreen
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'push')' in this line: 'enemies.push(enemy);' Line Number: 39
User prompt
Add enemy
User prompt
Move hero 30 pixels up
User prompt
Create backgrouns
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'addChild')' in this line: 'LK.gui.bottomCenter.addChild(growthTxt);' Line Number: 88
===================================================================
--- original.js
+++ change.js
@@ -19,15 +19,15 @@
var Hero = Container.expand(function () {
var self = Container.call(this);
var heroGraphics = self.createAsset('hero', 'Hero character', .5, .5);
});
-var Enemy = Container.expand(function () {
+var Enemy = Container.expand(function (hero) {
var self = Container.call(this);
var enemyGraphics = self.createAsset('enemy', 'Enemy character', .5, .5);
self.speedY = 2;
self.move = function () {
- var dx = hero.x - self.x;
- var dy = hero.y - self.y;
+ var dx = this.hero.x - self.x;
+ var dy = this.hero.y - self.y;
var angle = Math.atan2(dy, dx);
self.x += Math.cos(angle) * self.speedY;
self.y += Math.sin(angle) * self.speedY;
};
@@ -41,9 +41,9 @@
var Game = Container.expand(function () {
var self = Container.call(this);
var enemies = [];
self.spawnEnemy = function () {
- var enemy = new Enemy();
+ var enemy = new Enemy(hero);
enemy.x = Math.random() * 2048;
enemy.y = -enemy.height;
enemies.push(enemy);
self.addChild(enemy);
Goku arms doing kamehameha. seen from above. 8-bit. Cartoon. In game asset. No shadow Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. Cartoon. Orange energy ball. . In game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
rotate image 45 degrees
8-bit. cartoon. white energy ball. gradieint. transparent. in game asset. flicker. shoot. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. cartoon. front view. flying final boss. white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.