User prompt
Fix Bug: 'TypeError: hero.getGlobalPosition is not a function' in or related to this line: 'var heroRightEdge = hero.getGlobalPosition().x + hero.width / 2;' Line Number: 17
User prompt
Fix Bug: 'TypeError: this.getGlobalPosition is not a function' in or related to this line: 'var cubeLeftEdge = this.getGlobalPosition().x - this.width / 2;' Line Number: 16
User prompt
the hero must interact not only with the top edge of the cube but also with the left side edge of the cube if he has no neighboring cubes
User prompt
the hero must interact not only with the top edge of the cube but also with the left side edge of the cube
User prompt
the hero must interact not only with the top edge of the cube but also with the left side
User prompt
completely rework the system of collision between heroes and cubes, the hero should not pass through the cubes
User prompt
completely rework the system of collision between heroes and cubes, the hero should not pass through the cubes
User prompt
add collision to the sides of the cube
User prompt
the hero must be born on the surface of the cubes
User prompt
add collisions between the cubes and the hero
User prompt
add interaction between cubes and the hero
User prompt
cancel the automatic movement of the hero to the top, the hero must fall down if he does not get to the top as a result of a jump
User prompt
the hero shouldn't be bouncing in place
User prompt
the hero bounces on the spot, take it away.
User prompt
the hero bounces on the spot, take it away.
User prompt
make the jump only on mouse click
User prompt
bounce in place
User prompt
the hero should bounce a little from collisions with the sides of the cubes
User prompt
do not carry the hero to the top of the pillar automatically, when colliding with the sides of the cubes
User prompt
increase the range of the hero's forward jump
User prompt
direct the hero's jump forwards and upwards
User prompt
the hero must move horizontally in sync with the cubes.
User prompt
the hero must move horizontally in sync with the cubes.
User prompt
when colliding with the sides of the cubes, the hero must move horizontally in sync with the cubes
User prompt
Fix Bug: 'ReferenceError: Pole is not defined' in or related to this line: 'var newPole = game.addChild(new Pole());' Line Number: 156
===================================================================
--- original.js
+++ change.js
@@ -13,9 +13,9 @@
self.checkSideCollisionWithHero = function (hero) {
// Check if there is no cube to the left
if (!this.parent || this.parent.cubes.indexOf(this) === 0) {
var cubeLeftEdge = this.getBounds().x;
- var heroRightEdge = hero.getGlobalPosition().x + hero.width / 2;
+ var heroRightEdge = hero.getBounds().x + hero.width / 2;
// Check if hero's right edge is past the cube's left edge and hero is at cube level
if (heroRightEdge > cubeLeftEdge && hero.y >= this.y && hero.y <= this.y + this.height) {
hero.velocityX = 0; // Stop hero's horizontal movement
hero.x = cubeLeftEdge - hero.width / 2; // Position hero at the cube's left edge
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.