@@ -32,7 +32,9 @@ ballSprite.setPosition(randint(10, screen.width - 10), playerSprite.y)
// game mechanics
forever(function () {
-
+ if (playerSprite.overlapsWith(ballSprite) && controller.A.isPressed()) {
+ ballSprite.follow(hoopSprite, randint(50, 100))
+ }
})
// on countdown end