User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'x')' in this line: 'engineParticle.x = hero.x;' Line Number: 136
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'x')' in this line: 'engineParticle.x = hero.x;' Line Number: 136
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'x')' in this line: 'engineParticle.x = hero.x;' Line Number: 136
User prompt
spawn particles behind hero
Code edit (1 edits merged)
Please save this source code
User prompt
Spawn enertyparticle below hero
User prompt
Initialize engine particle below hero
User prompt
Fix Bug: 'ReferenceError: hero is not defined' in this line: 'if (self.y > hero.y + hero.height) {' Line Number: 6
User prompt
Fix Bug: 'ReferenceError: hero is not defined' in this line: 'if (self.y > hero.y + hero.height) {' Line Number: 6
User prompt
Add engineparticle to be shown below hero as turbine effect
User prompt
Add trail effect below hero
User prompt
Move hero spawn position 100 pixels up
User prompt
Move enemy hero 200 pixela up
User prompt
Move enemy hero 100 pixels up
User prompt
Add scores when enmies are killed more score as game progrsses
User prompt
Fix Bug: 'TypeError: self.createSecondBackground is not a function' in this line: 'self.createSecondBackground();' Line Number: 81
User prompt
Clouds should move at a differnt speed than backgrouns
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in this line: 'self.secondBackground.y += backgroundSpeed;' Line Number: 78
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in this line: 'self.secondBackground.y += backgroundSpeed;' Line Number: 78
User prompt
Make smooth transition betwen backgrouns
User prompt
Make game more dificult as time progresses
User prompt
Slowly move backgeound downwards and add the same backgeound after it
User prompt
Stop backgeound scrolling
User prompt
Herobullet should move like hero even when chargin
User prompt
Show cloud over bacjgrouns z axis
===================================================================
--- original.js
+++ change.js
@@ -55,10 +55,11 @@
self.move = function () {
var dx = this.hero.x - this.x;
var dy = this.hero.y - this.y;
var angle = Math.atan2(dy, dx);
- self.x += Math.cos(angle) * self.speedY + Math.sin(LK.ticks / 60) * 5;
- self.y += Math.sin(angle) * self.speedY;
+ var speedMultiplier = 1 + Math.floor(LK.ticks / 7200);
+ self.x += (Math.cos(angle) * self.speedY + Math.sin(LK.ticks / 60) * 5) * speedMultiplier;
+ self.y += Math.sin(angle) * self.speedY * speedMultiplier;
self.lifebar.scale.x = self.life / 100;
};
});
var ScrollingBackground = Container.expand(function () {
@@ -67,9 +68,10 @@
backgroundGraphics.width = 2048;
backgroundGraphics.height = 2732 * 2;
self.y = -2732;
self.scroll = function () {
- self.y += 1;
+ var backgroundSpeed = 1 + Math.floor(LK.ticks / 7200);
+ self.y += backgroundSpeed;
if (self.y >= 0) {
self.y = -2732;
}
};
@@ -86,9 +88,10 @@
};
var enemySpawnTicker = 0;
LK.on('tick', function () {
scrollingBackground.scroll();
- if (enemySpawnTicker++ % 120 === 0) {
+ var spawnRate = Math.max(30, 120 - Math.floor(LK.ticks / 3600));
+ if (enemySpawnTicker++ % spawnRate === 0) {
self.spawnEnemy();
}
});
var scrollingBackground = self.addChildAt(new ScrollingBackground(), 0);
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.