User prompt
place a cube_fast in every tenth column in front of the player
User prompt
Fix Bug: 'Uncaught ReferenceError: CollapsingCube is not defined' in or related to this line: 'cube = new CollapsingCube();' Line Number: 57
User prompt
put one cube_fast in every 10 columns in front of the hero
User prompt
Fix Bug: 'Uncaught ReferenceError: cubeType is not defined' in or related to this line: 'if (isCollapsing) {' Line Number: 70
User prompt
place a cube_fast in every tenth column in front of the player
User prompt
Fix Bug: 'Uncaught ReferenceError: type is not defined' in or related to this line: 'if (isCollapsing) {' Line Number: 69
User prompt
place a cube_fast in every tenth column in front of the player
User prompt
put a cube_fast in every tenth column in front of the player.
User prompt
Alarm should flash twice per second
User prompt
Alarm should be on the screen for 5 seconds
User prompt
Alarm should be on the screen for 10 seconds
User prompt
shift Alarm to the right by 100 and up by 100.
User prompt
shift Alarm to the left 500 and down 500.
User prompt
When the hero hits the cube_collapse, display Alarm in the upper right part of the screen.
User prompt
Align background2 with the bottom edge.
User prompt
center the background on the bottom edge.
User prompt
make a background2 and place it behind the background.
User prompt
add a background.
User prompt
a hero must be born on the surface of the columns.
User prompt
make the fall of all columns after the hero hits cube_collapse twice as fast.
User prompt
hero's hit on cube_collapse leads to immediate fall of all columns
User prompt
Fix Bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'hasCollapsingCube')' in or related to this line: 'self.hasCollapsingCube = isCollapsing;' Line Number: 139
User prompt
hero's hit on cube_collapse leads to immediate fall of all columns
User prompt
put one cube_collapse in every 50 columns in front of the hero
User prompt
insert one cube_collapse every 50 columns all the time
===================================================================
--- original.js
+++ change.js
@@ -32,9 +32,8 @@
self.y += self.velocityY; // Fall speed with acceleration
}
};
});
-// Class for collapsing cubes with distinct behavior
var CollapsingCube = Container.expand(function () {
var self = Container.call(this);
self.attachAsset('cube_collapse', {
anchorX: 0.5,
@@ -56,10 +55,9 @@
self.addCube = function (isCollapsing) {
var cube;
if (isCollapsing) {
cube = new CollapsingCube();
- } else if (self.cubes.length === 9) {
- // Every tenth cube is a fast cube
+ } else if (type === 'fast') {
cube = new FastCube();
} else {
cube = new Cube();
}
@@ -225,9 +223,14 @@
pole.y = 2732 - 50; // Align base of pole with bottom of the screen and raise by 50 pixels
for (var j = 0; j < 10; j++) {
// Add 9 cubes to each pole and one collapsing cube every 50 poles
var isCollapsing = poleCounter % 50 === 0 && j === 9; // Make the top cube a collapsing cube every 50 poles
- pole.addCube(isCollapsing);
+ var isFast = poleCounter % 10 === 0 && j === 9; // Place a fast cube in every tenth column
+ if (isFast) {
+ pole.addCube('fast');
+ } else {
+ pole.addCube(isCollapsing);
+ }
}
poleCounter++;
poles.push(pole);
}
girl sitting on Wrecking Ball, cartoon style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
construction cranes on the sides of the frame, depth of field blur, cartoon style, black and white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
"ALARM" text bubble, comic style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the surface is gray, concrete with a black square in the center. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Wrecking Ball with eyes, cartoon style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the surface is red, concrete with a black square in the center.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
"ALARM" text bubble yellow, comic book style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the surface is yellow, concrete with a black square in the center. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.