User prompt
Rewrite the hero class such that the shield effect is drawn below the health bars
User prompt
Call updateShield on hero instead of updating the shieldBar directly
User prompt
Call updateShield on hero instead of updating the shieldBar directly
User prompt
Please make sure shield effect element is attached
User prompt
Set shield effect to visible when shield health is larger than zero
User prompt
Add a shield effect element to the hero which is visible if the shield is active
User prompt
Make the shield health bar be closer to the hero health bar
User prompt
Make the hero shield bar steel blue
User prompt
Update the shield health bar, when the shield takes damage. Hide the shield health bar when the shield runs out of power.
User prompt
When creating the shield health bar parse along a blue color
User prompt
When creating the hero health bar, parse along a green color
User prompt
When creating enemy health bars, parse along a red color
User prompt
Update helthbar constructor to accept a color value. Then use that color value to tint the health bar asset
User prompt
Rewrite the powerup for loop that checks for powerup pickups to make shield powerup health bar visible when picking up a shield.
User prompt
The shield Helth bar should be visible when we have an active shield and be drawn 10px above the normal hero health bar
User prompt
Add a separate health bar for hero shield. Make this health bar appear above the normal health bar.
User prompt
Add powerup type that adds a shield to the hero ship. The shield should be able to absorb 10 bullets before being destroyed.
User prompt
Add another powerup type that makes the ship move 10% faster
User prompt
Create another powerup type that resets the hero health to full health
User prompt
Prevent fire rate from ever being smaller than 5
User prompt
Floor hero.fireRate when using it in handleTick
User prompt
Instead of decreasing fireRate by 1 decrease fire rate by 10% when collecting powerup
User prompt
Add powerups to the game which when collected decreases the hero firerate variable by 1
User prompt
Use the hero fire rate variable to control how fast the hero ship shoots
User prompt
Create a variable in the hero class that represents the fire rate speed
===================================================================
--- original.js
+++ change.js
@@ -80,9 +80,9 @@
self.shieldBar.y = self.healthBar.y - 30;
self.shieldBar.visible = false;
self.shieldEffect = XS.getAsset('shieldEffect', 'Shield Effect Graphics', 0.5, 0.5);
self.shieldEffect.visible = false;
- self.addChild(self.shieldEffect);
+ self.addChildAt(self.shieldEffect, 0);
self.updateShield = function () {
if (self.shield > 0) {
self.shieldBar.visible = true;
self.shieldEffect.visible = true;
Round powerup. Shield icon Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Extra missile powerup circle. Missile and plus sign. Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Single space torpedo flying upwards Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Background galaxy nebulas and galaxies Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast. --ar 1:10
Round powerup. Green health icon Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Blue glowing powerup circle with s in center Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Round powerup. Lightning icon pointing up. Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Stylish hero spaceship facing upwards, with a single cannon in the center. Single 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.
Single enemy slime bullet, seen from above facing upwards. Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Round powerup icon with bullseye Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Clean plasma bubble Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.