Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: isGamePaused is not defined' in or related to this line: 'if (!isGamePaused) {' Line Number: 440
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'x')' in or related to this line: 'currentBackground.x = 2048 / 2;' Line Number: 398
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: round is not defined' in or related to this line: 'var currentBackground = LK.getAsset('background' + round, {' Line Number: 431
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: displayRoundText is not defined' in or related to this line: 'displayRoundText(gameRound);' Line Number: 454
Code edit (2 edits merged)
Please save this source code
User prompt
add handswithgloves asset to screen
Code edit (1 edits merged)
Please save this source code
User prompt
only increase score if entire ball goes through basket
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: game.addchild is not a function' in or related to this line: 'game.addchild(self.leftElement);' Line Number: 219
Code edit (1 edits merged)
Please save this source code
Code edit (23 edits merged)
Please save this source code
User prompt
make the roundText opaque
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
remove the little ball at the top left of the screen
User prompt
if ball intersects with defender reset multiplier
User prompt
if ball intersects with defender remove multiplier
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -354,8 +354,10 @@
var powerBar3Displayed = false;
var powerBar4Displayed = false;
var gameRound = 1;
var currentBackground;
+var timerTxt;
+var gameTime = 100;
// ***
// This function resets/updates the assets at each round
var newRoundFunc = function newRoundFunc(round) {
// background
@@ -377,39 +379,25 @@
roundText.anchor.set(0.5, 0.5); // Center the text
roundText.x = 2048 / 2; // Center horizontally
roundText.y = 500; // Center vertically
game.addChild(roundText);
- // Remove ROUND 1 text after 3 seconds
+ // Remove roundtext after 3 seconds
LK.setTimeout(function () {
game.removeChild(roundText);
}, 3000);
+ // Timer text
+ LK.gui.topLeft.removeChild(timerTxt);
+ timerTxt = new Text2('100', {
+ size: 150,
+ fill: "#ffffff"
+ });
+ timerTxt.anchor.set(0, 0);
+ timerTxt.x = 50;
+ timerTxt.y = 50;
+ LK.gui.topLeft.addChild(timerTxt);
};
newRoundFunc(gameRound);
-var timerTxt = new Text2('00:00', {
- size: 150,
- fill: "#ffffff"
-});
-timerTxt.anchor.set(0, 0);
-timerTxt.x = 50;
-timerTxt.y = 50;
-LK.gui.topLeft.addChild(timerTxt);
-// Initialize streak counter text display
-var streakCounterTxt = new Text2('Streak: 0', {
- size: 150,
- fill: "#ffffff"
-});
-streakCounterTxt.anchor.set(1, 0); // Anchor to the top right
-streakCounterTxt.x = 2048 - 50; // Position to the right, with a margin
-streakCounterTxt.y = 50; // Same vertical position as timer
-LK.gui.topRight.addChild(streakCounterTxt);
-var gameTime = 100;
var isGamePaused = false;
-var pauseGame = function pauseGame() {
- isGamePaused = true;
-};
-var resumeGame = function resumeGame() {
- isGamePaused = false;
-};
var timerInterval = LK.setInterval(function () {
if (!isGamePaused) {
gameTime--;
if (gameTime <= 0) {
Basketball, cartoon style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
4:3 Simple rectangle white outline. Black background
Paris. Paris basketball backgroung. Eiffel Tower. Eurosport logo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
rainbow sparkle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
two white palms facing forward no background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. HD Color
POV basketball court in forest. Full screen. Background. High detail
basketball barn background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
basketball dungeon background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heaven background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pow effect. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
left hand. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Wide Single Orange metal bar lying down Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast. —ar 2:1
https://kagi.com/proxy/basketball_backboard.png?c=iNrrnnUOe99nVfDGJsYBLujiaX2Hu-zxBFRkvLEyXdRnJ8cU3RjcAYbR-o12E923qVNGy1CEGrQG87ogCD3yUarJdZYt5R03mmEMb7Jrh-8%3D blank backboard Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.