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
Code edit (3 edits merged)
Please save this source code
User prompt
add a callback to the Light's tween that calls it's parent's onLit function
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'downRow is undefined' in or related to this line: 'var downBlock = downRow.blocks[i];' Line Number: 206
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'blockClasses is undefined' in or related to this line: 'var blockClass = blockClasses[i];' Line Number: 183
User prompt
Please fix the bug: 'blockClasses is undefined' in or related to this line: 'var blockClass = blockClasses[i];' Line Number: 183
Code edit (1 edits merged)
Please save this source code
User prompt
in the randomizeBlockClass return a random element in the classes array
Code edit (7 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -397,8 +397,9 @@
var BLOCK_ROTATE_SPEED = 100;
var LIGHT_GROW_SPEED = 500;
var ROW_SPAN = 7;
var ROW_COUNT = 10;
+var blockClasses = [BlockBlank, BlockT, BlockX, BlockLine, BlockL];
var blockManager = game.addChild(new BlockManager());
var lava = game.addChild(new Lava({
x: game.width / 2,
y: LAVA_LINE
background
Music
light
Sound effect
rotate
Sound effect
error
Sound effect
crack
Sound effect
break
Sound effect
flow
Sound effect
bubble1
Sound effect
bubble2
Sound effect
bubble3
Sound effect
bubble4
Sound effect
bubble5
Sound effect
gong
Sound effect