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
User prompt
the lava class should create LAVA_SLICE_COUNT instances of the LavaSlice class, with indices from 1 to LAVA_SLICE_COUNT (inclusive). These should be uniformly distributed on either side of the Lava origin, assuming that each slice is LAVA_SLICE_WIDTH in size, and has a center origin
User prompt
the lavaslice contains an asset with id "lava" + config.index, and anchor of 0.5,0
Code edit (1 edits merged)
Please save this source code
User prompt
Create a lava instance at GAME_WIDTH/2, LAVA_LINE
User prompt
add global constants: GAME_WIDTH and GAME_HEIGHT set to that of the default screen size, and LAVA_LINE = GAME_HEIGHT - 200
User prompt
add global constants: LAVA_SLICE_COUNT = 18, and LAVA_SLICE_WIDTH = 128
User prompt
Add two empty classes: Lava and LavaSlice, both inheriting from the ConfigContainer class
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -55,16 +55,16 @@
var self = ConfigContainer.call(this, config);
self.attachAsset('lava' + config.index, {
anchorX: 0.5,
anchorY: 0,
- tint: 0xFFA500
+ tint: 0xFF4D00
});
var glow = self.addChild(new Glow({
scaleY: -1,
height: 20,
range: 100,
width: LAVA_SLICE_WIDTH,
- tint: 0xFFA500
+ tint: 0xFF4D00
}));
self.update = function () {
self.y = Math.sin(LK.ticks * LAVA_BOB_PERIOD + config.index * LAVA_BOB_OFFSET) * LAVA_BOB_HEIGHT;
};
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