User prompt
When a drone is destroyed by a bullet, create an Explosion at its position before the drone is destroyed. Use backgroundContainer to add the explosion.
User prompt
Remove Blaster from wave 1
User prompt
Create an Explosion class that uses Container.expand. Attach the 'Explosion' asset with center anchors (0.5, 0.5). Start with scaleX and scaleY at 0.1, increase them in update, and destroy when scale reaches 2. Make sure to scale both the container and the graphics object.
Code edit (1 edits merged)
Please save this source code
User prompt
Add a check under the hero bullet section in game update for the Blaster enemy. If it is firing a laser, do not allow it to be destroyed.
User prompt
Add a check for Blasters in the enemy array and do not allow it to be destroyed if it currently is firing a laser.
Code edit (1 edits merged)
Please save this source code
User prompt
In update firing add a check for cleaning up laser segments. If the origin becomes null, do not consider the attack complete until all laser segments are cleaned up
User prompt
Remove detachbeam method
User prompt
If Blaster is about to be destroyed, check for active laser, if there is one, finish firing before destroying Blaster.
User prompt
Add a check in laser segment class. If origin ever becomes null, destroy all laser segments.
User prompt
Laser isn’t working properly. After firing duration is complete the laser segments should be cleaned up.
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5')' in or related to this line: 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5; // Fade in' Line Number: 1889
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5')' in or related to this line: 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5; // Fade in' Line Number: 1887
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5')' in or related to this line: 'this.chargeEffect.alpha = 0.5 + chargeProgress * 0.5; // Fade in' Line Number: 1885
User prompt
Laser should charge for duration, fire for duration and then clean up all laser segments.
User prompt
After firing is complete. Clean up all laser segments.
User prompt
Remove slide duration from laser mechanic call in blaster class
User prompt
Remove slide duration from laser mechanic.
User prompt
Remove sliding from laser mechanic
User prompt
Remove start sliding and update sliding classes from laser mechanic.
User prompt
Remove the sliding portion of the laser mechanic. Keep the charging and firing and just clean up all laser segments after firing is complete.
User prompt
Add a check in laser mechanic update firing method to slide all laser segments off screen even if full length is not reached when adding segments.
User prompt
It might be freezing if the Blaster is destroyed while the laser segments are still stacking. Need to add a check if the laser doesn’t reach full length for some reason that the laser segments start sliding after
User prompt
That didn’t fix the problem. Lasers are still remaining on screen if Blaster is destroyed during firing phase.
===================================================================
--- original.js
+++ change.js
@@ -695,8 +695,21 @@
scaleY: 1 // Each segment stays at normal scale
});
// Handle own collision
self.update = function () {
+ // Check if origin is null and destroy all segments
+ if (!self.origin) {
+ for (var i = activeLaserBeams.length - 1; i >= 0; i--) {
+ var laser = activeLaserBeams[i];
+ if (laser.segments) {
+ for (var j = laser.segments.length - 1; j >= 0; j--) {
+ game.removeChild(laser.segments[j]);
+ }
+ laser.segments = [];
+ }
+ activeLaserBeams.splice(i, 1);
+ }
+ }
if (CollisionManager.checkCollision(self, hero)) {
if (hero.shielded) {
hero.shieldLevel -= 1;
if (hero.shieldLevel <= 0) {
View of a futuristic soldier from directly overhead. White armor with blue glowing cyberpunk details. Holding weapon forward.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
The lights of a futuristic city in the dark at night. Very high above it looking straight down like from an airplane or a map. Background for an endlessly scrolling game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A big button that say Play to start playing a game. Use neon cyberpunk style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Overhead view. A hovering robot with a tapered midsection with two bulky arms with claw like hands and a giant red “eye” on top of its body. Looking straight down. Cyberpunk, black with red glowing highlights.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Overhead view. A heavily armored attack robot. Two arms with large gauntlet type fists. Four large red glowing eyes. Three distinct parts, body and two arms. Symmetrical design. Birds Eye view above them looking down on their head. Simple shapes. Low detail. Cyberpunk, black with red glowing highlights.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A red glowing line. Bright red core with subtle outer glow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A blue transparent dome type shield. Simple graphics. Low details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A ring of nuclear fire seen from overhead. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A thin robot with goggles riding a hover-bike. Twin blaster guns mounted on front. Top down view. Birds Eye view. Cyberpunk with red glowing highlights... Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Battle drone, circular. White with blue glowing highlights. Birds Eye view from overhead. Cyberpunk. Simple shapes.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
GameTheme
Music
TitleTheme
Music
HeroBlaster
Sound effect
Explosion
Sound effect
PowerUp
Sound effect
CloneSoldier
Sound effect
WeaponPowerUp
Sound effect
Drone
Sound effect
BinaryStorm
Sound effect
LaserCharge
Sound effect
LaserFire
Sound effect
BruiserStomp
Sound effect
RaiderSwoop
Sound effect
ShieldLevelUp
Sound effect
HeroHit
Sound effect
HeroScream
Sound effect