Code edit (1 edits merged)
Please save this source code
User prompt
on lk.on tick add a new if statement. if ball is moving downwards and y = 1000, then make ball stay in that exact position.
Code edit (2 edits merged)
Please save this source code
User prompt
on lk.on tick add a new if statement. if ball is moving downwards and y = 1000, then stop the ball and remove gravity.
User prompt
on lk.on tick add a new if statement. if ball is moving downwards and y = 1000, then stop the ball.
User prompt
in the game class, if ball is moving downwards and y is less than 1000, then stop the ball from moving and stop rotation progressibly.
User prompt
add code in game class that if ball is moving downards and y = 1000, then stop the ball movement.
User prompt
if ball is moving downards and y = 1000, then stop the ball movement.
User prompt
add check in game class. if ball is moving downwards and the position of the ball is lower than the hoop y position. then stop the ball movement.
Code edit (1 edits merged)
Please save this source code
User prompt
console log hoop position
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in this line: 'if (!(self.speed.y > 0 && self.y > self.hoop.y)) {' Line Number: 33
User prompt
Fix Bug: 'Uncaught ReferenceError: hoop is not defined' in this line: 'self.hoop = hoop;' Line Number: 31
User prompt
Fix Bug: 'Uncaught ReferenceError: hoop is not defined' in this line: 'var self = Container.call(this, hoop);' Line Number: 21
User prompt
Fix Bug: 'ReferenceError: hoop is not defined' in this line: 'if (!(self.speed.y > 0 && self.y > hoop.y)) {' Line Number: 33
User prompt
if the ball is moving downwards and its y position is lower than the middle of the hoops y at that moment, then ball should stop moving.
Code edit (1 edits merged)
Please save this source code
User prompt
remove the bouncing of the rims
User prompt
if ball hits rim it should stay still
Code edit (5 edits merged)
Please save this source code
User prompt
where is the fade effect of the ball after score?
Code edit (6 edits merged)
Please save this source code
User prompt
allow ball to go 300 pixels higher
Code edit (1 edits merged)
Please save this source code
User prompt
add a border to the hoopoutline asset
===================================================================
--- original.js
+++ change.js
@@ -154,9 +154,9 @@
self.addChild(ballShadow);
var ball = self.addChild(new Ball());
ball.hitElement = '';
hoop.x = 2048 / 2;
- hoop.y = 2732 / 2 - 100;
+ hoop.y = 2732 / 2 - 150;
hoop.hoopRimGraphics.x = hoop.x;
hoop.hoopRimGraphics.y = hoop.y + hoop.children[1].y - 650;
console.log('Hoop Inicial position:', hoop.x, hoop.y);
ball.x = 2048 / 2;
@@ -221,11 +221,9 @@
child.move();
}
});
var floorY = 2732 - 140 + 900 * (ball.scale.y - 1);
- if (!(ball.speed.y > 0 && ball.y === 1000)) {
- ball.move();
- }
+ ball.move();
if (ball.speed.y > 0) {
self.removeChild(hoop.hoopRimGraphics);
self.addChild(hoop.hoopRimGraphics);
}
Cartoon. Grass background. Backyard. Top view. In game asset Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon. Wood board. In game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stars particles. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.