Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: t.setStageReference is not a function' in this line: 'parent.addChild(self);' Line Number: 12
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: heroGraphics is not defined' in this line: 'LK.effects.flashObject(heroGraphics, 0xaa0000, 1000);' Line Number: 474
Code edit (8 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: projectileCount is not defined' in this line: 'var angleIncrement = Math.PI * 2 / projectileCount;' Line Number: 376
Code edit (6 edits merged)
Please save this source code
User prompt
do not destroy healthpickups when collecting a crucifix
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.getAsset is not a function' in this line: 'var arrowGraphics = self.getAsset('arrow', 'Directional Arrow', -1.0, 0.5);' Line Number: 394
Code edit (10 edits merged)
Please save this source code
User prompt
add an arrow asset to the hero that points towards the shootPos
User prompt
create an arrow asset for the hero that points towards from the hero to the shootPos with an offset of 100 units
User prompt
add an arrow asset to the hero that points towards the shootPos with an offset of 100 units
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
add a HealthBar to the BasicEnemy class only if it's been hit
User prompt
Create a new `HealthBar` class based on the hero's health bar
User prompt
create a new HealthBar class based on the heroes healthbar, without changing the hero itself
Code edit (4 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: enemy is not defined' in this line: 'LK.effects.flashObject(enemy, 0xaa0000, 1000);' Line Number: 197
Code edit (1 edits merged)
Please save this source code
User prompt
enemies briefly flash white when hit
===================================================================
--- original.js
+++ change.js
@@ -309,8 +309,13 @@
var enemy = enemies[i];
var lastHitTick = hitMap[enemy.id];
if (self.intersects(enemy) && (!lastHitTick || tick - lastHitTick > 10)) {
enemy.health -= damage;
+ if (!enemy.healthBar) {
+ enemy.healthBar = new HealthBar(enemy, 0.5, 0);
+ enemy.healthBar.y = -enemy.height / 2 - 10;
+ }
+ enemy.healthBar.update(enemy.health, enemy.initialHealth);
LK.effects.flashObject(enemy, 0xaa0000, 1000);
hitMap[enemy.id] = tick;
}
}
pixel art cross with blue accents Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a pulsating white heart with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a dark goo projectile with red highlights. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art tall blue fireball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of an evil fantasy sword facing downward. Minor red details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
backgroundAmbient
Sound effect
heroHealed
Sound effect
pickupExperience
Sound effect
heroLeveled
Sound effect
weaponCrossImpact
Sound effect
heroImpact
Sound effect
enemyDeath
Sound effect
pickupWeapon
Sound effect
pickupCrucifix
Sound effect
weaponCrossLaunch
Sound effect
heroDeath
Sound effect
enemyRoar
Sound effect
clockChime
Sound effect