User prompt
in the randomizeBlockClass return a random element in the classes array
Code edit (7 edits merged)
Please save this source code
User prompt
remove ROW_MIDPOINT and ROW_SPAN_BASE
User prompt
Please fix the bug: 'ROW_SPAN_BASE is not defined' in or related to this line: 'var ROW_MIDPOINT = Math.floor(ROW_SPAN_BASE / 2);' Line Number: 428
Code edit (11 edits merged)
Please save this source code
User prompt
create an instance of the BlockManager class before creating the lava
User prompt
create a new empty BlockManager class that inherits from the Container class
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'layerAlpha is not defined' in or related to this line: 'self.attachAsset('shapeBox', {' Line Number: 128
Code edit (1 edits merged)
Please save this source code
User prompt
each lavaslice should create a glow instance with a scaley of -1, height of 20, range of 100, and width of LAVA_SLICE_WIDTH
User prompt
each subsequent glowlayer should have it's height increased by config.range (default of 0) divide by layers
User prompt
Create a new Glow class that inherits from the ConfigContainer that creates a number of shapeBox assets with anchor 0.5,1.0 and width, height and tint derived config.width, config.height, and config.tint. The number of assets is determined by config.layers (minimum of 2, default of 10), the alpha of each asset is determined from config.alpha (default of 1) divided by the number of layers
Code edit (6 edits merged)
Please save this source code
User prompt
tint the lava slice asset orange
Code edit (1 edits merged)
Please save this source code
User prompt
add an update method to the LavaSlice class where the y position is set to the sin of the ticks
User prompt
add a lavaslice update method which sets its y position based on a sin of the game time
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'config is not defined' in or related to this line: 'var self = ConfigContainer.call(this, config);' Line Number: 93
User prompt
Please fix the bug: 'self.config is undefined' in or related to this line: 'var lavaAsset = self.attachAsset('lava' + self.config.index, {' Line Number: 94
User prompt
Please fix the bug: 'config is not defined' in or related to this line: 'var lavaAsset = self.attachAsset('lava' + config.index, {' Line Number: 94
User prompt
Please fix the bug: 'config is not defined' in or related to this line: 'var lavaAsset = self.attachAsset('lava' + config.index, {' Line Number: 94
User prompt
Please fix the bug: 'config is not defined' in or related to this line: 'var lavaAsset = self.attachAsset('lava' + config.index, {' Line Number: 94
===================================================================
--- original.js
+++ change.js
@@ -396,11 +396,11 @@
var currentIndex = array.length;
while (currentIndex != 0) {
var randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex--;
- var _ref = [array[randomIndex], array[currentIndex]];
- array[currentIndex] = _ref[0];
- array[randomIndex] = _ref[1];
+ var ref = [array[randomIndex], array[currentIndex]];
+ array[currentIndex] = ref[0];
+ array[randomIndex] = ref[1];
}
}
function generateBlockClasses(index) {
switch (index) {
@@ -413,5 +413,6 @@
}
}
function randomizeBlockClass(index) {
var classes = [BlockBlank, BlockT, BlockX, BlockLine, BlockL];
+ return classes[Math.floor(Math.random() * classes.length)];
}
\ No newline at end of file
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