User prompt
when the hero hits cube_fast the cube drop starts before the middle of the screen
User prompt
when a hero hits cube_fast the cube drop starts earlier by 25 percent
User prompt
when a hero hits cube_fast the cube drop starts earlier by 25 percent
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'onComplete')' in or related to this line: 'LK.loader.onComplete.add(function () {});' Line Number: 251
User prompt
don't start the game until all the assets are loaded.
User prompt
redo alarm and alarm2 blinks, make them blink three times, with a period of 1 time per second.
User prompt
Between cube_fast and cube_collapse there should be a gap of at least two columns
User prompt
put one cube_collapse in every 22 columns in front of the hero
User prompt
Between cube_fast and cube_collapse there should be a gap of at least two columns
User prompt
cube_fast and cube_collapse must not be in neighboring columns
User prompt
cube_fast and cube_collapse must not be in neighboring columns
User prompt
don't put cube_fast and cube_collapse next to each other.
User prompt
don't put cube_fast and cube_collapse next to each other.
User prompt
cube_fast and cube_collapse should always be placed at the very top of the posts
User prompt
cube_fast and cube_collapse should always be placed on top
User prompt
make the mutual arrangement of cube_fast and cube_collapse more randomized
User prompt
Alarm2 down 300
User prompt
Alarm2 blinks 2 times once per second
User prompt
put one cube_collapse in every 17 columns in front of the hero
User prompt
put one cube_collapse in every 17 columns in front of the hero
User prompt
display Alarm2 in the upper right corner of the screen when the hero hits cube_fast
User prompt
Fix Bug: 'Uncaught ReferenceError: AlarmDisplay is not defined' in or related to this line: 'var alarmDisplay = game.addChild(new AlarmDisplay());' Line Number: 219
User prompt
display Alarm2 in the upper right corner of the screen when the hero hits cube_fast
User prompt
there should be no cube_fast and cube_collapse in the first 100 columns
User prompt
place one cube_fast in every 10 column in front of the player
===================================================================
--- original.js
+++ change.js
@@ -124,9 +124,9 @@
};
self.update = function () {
self.y += self.velocityY;
self.velocityY += 0.5; // Gravity effect
- // Check for collision with collapsing cubes and display Alarm if hit
+ // Check for collision with cubes and display Alarm or Alarm2 if hit
for (var i = 0; i < poles.length; i++) {
var pole = poles[i];
for (var j = 0; j < pole.cubes.length; j++) {
var cube = pole.cubes[j];
@@ -137,8 +137,12 @@
});
// Display the Alarm
alarmDisplay.show();
break;
+ } else if (cube instanceof FastCube && self.intersects(cube) && !cube.isFalling) {
+ // Display the Alarm2
+ alarmDisplay2.show();
+ break;
}
}
}
};
@@ -162,18 +166,18 @@
});
self.x = 2048 / 2;
self.y = 2732 - self.height / 2;
});
-// Class for the Alarm display
-var AlarmDisplay = Container.expand(function () {
+// Class for the Alarm2 display
+var AlarmDisplay2 = Container.expand(function () {
var self = Container.call(this);
- self.attachAsset('Alarm', {
+ self.attachAsset('Alarm2', {
anchorX: 1.0,
// Anchor to the right
anchorY: 0.0 // Anchor to the top
});
- self.x = 2048 - 400; // Position to the left by 400
- self.y = 400; // Position down by 400
+ self.x = 2048; // Position to the right edge
+ self.y = 0; // Position to the top edge
self.visible = false; // Initially not visible
self.show = function () {
self.visible = true;
var flashInterval = LK.setInterval(function () {
@@ -198,12 +202,14 @@
/****
* Game Code
****/
-// Instantiate AlarmDisplay
+// Instantiate AlarmDisplay and AlarmDisplay2
var alarmDisplay = game.addChild(new AlarmDisplay());
-// Set the zIndex to ensure it's on top
+var alarmDisplay2 = game.addChild(new AlarmDisplay2());
+// Set the zIndex to ensure they're on top
alarmDisplay.zIndex = 1;
+alarmDisplay2.zIndex = 1;
// Create the second background
var background2 = game.addChild(new Background2());
background2.zIndex = -1;
// Create the background
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.