User prompt
Fix Bug: 'ReferenceError: sqrt is not defined' in this line: 'var distance = sqrt(distance);' Line Number: 317
Code edit (6 edits merged)
Please save this source code
User prompt
Here's a list of things to do: 1) set enemy health bar offset from 50 to -50. 2) Increase enemy attack range from 100. 3) Add a setFill function to the BorderText, which sets the fill of the last element of textList. 4) Reduce healingpickup limit from 5 to 3.
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: weapons is undefined' in this line: 'weapons.push(new CrossWeapon(self));' Line Number: 700
Code edit (1 edits merged)
Please save this source code
User prompt
Create a DoubleLinkedList class with Node class for linked list elements
Code edit (4 edits merged)
Please save this source code
User prompt
add a function that creates a generic linkedlist
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- original.js
+++ change.js
@@ -35,22 +35,21 @@
node.next = null;
this.length--;
};
DoubleLinkedList.prototype.forEach = function (callback) {
- var current = this.head;
- while (current) {
- callback(current);
- current = current.next;
+ var node = this.head;
+ while (node) {
+ var next = node.next;
+ callback(node.data, node);
+ node = next;
}
};
-function updateIteration(container, args) {
- for (var i = 0; i < container.length; i++) {
- if (container[i].update(args)) {
- container[i].destroy();
- container.splice(i, 1);
- i--;
+function updateIteration(list, args) {
+ list.forEach(function (item, node) {
+ if (item.update(args)) {
+ list.remove(node);
}
- }
+ });
}
var Point = Container.expand(function (parent, x, y) {
var self = Container.call(this);
parent.addChild(self);
@@ -670,9 +669,9 @@
var progressBar = LK.getAsset('progressBar', 'Progress Bar', 0, .5);
var enemyIdCounter = -1;
var heroProjectiles = DoubleLinkedList();
var enemyProjectiles = DoubleLinkedList();
- var weapons = new DoubleLinkedList();
+ var weapons = DoubleLinkedList();
var enemies = DoubleLinkedList();
var healthPickups = DoubleLinkedList();
var crucifixPickups = DoubleLinkedList();
var experiencePickups = DoubleLinkedList();
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