User prompt
When updating score textg also call LK.setScore
User prompt
Make ship shoot twice as fast
Code edit (1 edits merged)
Please save this source code
User prompt
Make ship shoot twice as fast
User prompt
Add powerups to the game that makes the ship shoot two bullets side by side for 5 seconds.
User prompt
Make ship shoot twice as fast
User prompt
Make ship shoot twice as fast
User prompt
Fix Bug: 'ReferenceError: Can't find variable: HeroBullet' in this line: 'var bullet = new HeroBullet();' Line Number: 84
===================================================================
--- original.js
+++ change.js
@@ -1,11 +1,11 @@
var HeroBullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = LK.getAsset('heroBullet', 'Hero Bullet Graphics', 0.5, 0.5);
self.addChild(bulletGraphics);
- self.speed = -5;
+ self.speed = 10;
self.move = function () {
- self.y += self.speed;
+ self.y -= self.speed;
};
});
var EnemyBullet = Container.expand(function () {
var self = Container.call(this);
@@ -187,9 +187,9 @@
if (allEnemiesKilled) {
currentWave++;
spawnWave();
}
- if (LK.ticks % 30 === 0) {
+ if (LK.ticks % 15 === 0) {
fireHeroBullet();
}
enemies.forEach(function (enemy, index) {
if (LK.ticks % 90 === 0) {
Single space torpedo flying upwards Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Single enemy slime bullet flying downwards. Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
single alien enemy spaceship facing down, looking like space alien adopted to living in space. Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Hero spaceship facing upwards, with a single cannon in the center. Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.