Update index.html
Browse files- index.html +3 -2
index.html
CHANGED
@@ -41,7 +41,7 @@
|
|
41 |
let ballPosition = { top: 0, left: Math.random() * 90 }; // Bola muncul secara acak.
|
42 |
let isCaught = false; // Apakah bola ditangkap.
|
43 |
let score = 0; // Skor awal.
|
44 |
-
let fallSpeed = 0.5; // Kecepatan bola
|
45 |
|
46 |
// Fungsi untuk memindahkan platform ke kiri
|
47 |
function movePlatformLeft() {
|
@@ -118,7 +118,8 @@
|
|
118 |
ball.style.top = ballPosition.top + '%';
|
119 |
platform.style.left = platformPosition + '%';
|
120 |
isCaught = false;
|
121 |
-
|
|
|
122 |
}
|
123 |
|
124 |
// Fungsi untuk menampilkan overlay Game Over
|
|
|
41 |
let ballPosition = { top: 0, left: Math.random() * 90 }; // Bola muncul secara acak.
|
42 |
let isCaught = false; // Apakah bola ditangkap.
|
43 |
let score = 0; // Skor awal.
|
44 |
+
let fallSpeed = 0.5; // Kecepatan bola yang konsisten.
|
45 |
|
46 |
// Fungsi untuk memindahkan platform ke kiri
|
47 |
function movePlatformLeft() {
|
|
|
118 |
ball.style.top = ballPosition.top + '%';
|
119 |
platform.style.left = platformPosition + '%';
|
120 |
isCaught = false;
|
121 |
+
// Kecepatan bola tidak berubah
|
122 |
+
fallSpeed = 0.5; // Tetap sama
|
123 |
}
|
124 |
|
125 |
// Fungsi untuk menampilkan overlay Game Over
|