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
User prompt
swap the assets for lava11 and lava12
User prompt
all lava assets should be 128x1024
User prompt
create assets lava6 to lava16
Code edit (4 edits merged)
Please save this source code
User prompt
the light class should tween it's lightShape alpha and scale from 0 to 1 over LIGHT_GROW_SPEED
User prompt
Create a new Light class that inherits from the ConfigContainer. It should contain a single shapeEllipse with width and height of BLOCK_SIZE, anchor of 0.5,1 and a scale and alpha of 0
===================================================================
--- original.js
+++ change.js
@@ -52,13 +52,13 @@
return self;
});
var LavaSlice = ConfigContainer.expand(function (config) {
var self = ConfigContainer.call(this, config);
- var lavaAsset = self.attachAsset('lava' + config.index, {
+ self.attachAsset('lava' + config.index, {
anchorX: 0.5,
- anchorY: 0
+ anchorY: 0,
+ tint: 0xFFA500 // Tint the lava slice asset orange
});
- lavaAsset.tint = 0xFFA500; // Tint the lava slice asset orange
self.update = function () {
self.y = Math.sin(LK.ticks * LAVA_BOB_PERIOD + config.index * LAVA_BOB_OFFSET) * LAVA_BOB_HEIGHT;
};
return self;
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