Code edit (5 edits merged)
Please save this source code
User prompt
add an onDestroy function in the block class that destroys the self.lightCOntainer
User prompt
in the blockRow class add an onDestroy function that calls the callDestroy function on all its children
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: y is not defined' in or related to this line: 'y += rowSpeed;' Line Number: 212
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'x is not defined' in or related to this line: 'makeGlow(x, BLOCK_SIZE / 2 + BLOCK_MARGIN / 4);' Line Number: 296
Code edit (1 edits merged)
Please save this source code
User prompt
add a tween for each glow instance created in the onLit function of the block class. It should go from alpha 0 to 1 over 500ms
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: parent is undefined' in or related to this line: 'self.lightContainer.x = self.x + parent.x;' Line Number: 269
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'self.lightContainer is undefined' in or related to this line: 'self.y = Math.sin(LK.ticks * LAVA_BOB_PERIOD + config.index * LAVA_BOB_OFFSET) * LAVA_BOB_HEIGHT;' Line Number: 158
User prompt
Please fix the bug: 'self.lightContainer is undefined' in or related to this line: 'self.lightContainer.removeChildren();' Line Number: 279
User prompt
Please fix the bug: 'self.parent is null' in or related to this line: 'self.lightContainer = lightManager.addChild(new ConfigContainer({' Line Number: 248
User prompt
Please fix the bug: 'self.parent is null' in or related to this line: 'self.lightContainer = lightManager.addChild(new ConfigContainer({' Line Number: 248
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Point is not a constructor' in or related to this line: 'var lightPosition = self.toGlobal(new Point());' Line Number: 248
User prompt
Please fix the bug: 'e is undefined' in or related to this line: 'var lightPosition = self.toGlobal();' Line Number: 248
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Point is not a constructor' in or related to this line: 'self.lightContainer = lightManager.addChild(new ConfigContainer({' Line Number: 248
User prompt
In the block class, set the lightContainer x and y position to be the global position of the block
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
before calling the onFinish callback in the Light class's tween, check that it is attached to a parent
===================================================================
--- original.js
+++ change.js
@@ -18,9 +18,9 @@
});
}
blockRows[0].blocks[Math.floor(ROW_SPAN / 2)].onLit();
self.update = function () {
- if (blockRows[0].y > LAVA_LINE) {
+ if (blockRows[0].y > game.height) {
popRow();
}
};
function addRow(settings) {