Bomb fix
This commit is contained in:
parent
acb76c195b
commit
82ffa5cbed
@ -178,7 +178,8 @@ function keyDownPressed(e) {
|
||||
if (e.keyCode === 80) togglePause();
|
||||
|
||||
if (e.keyCode === 16) {
|
||||
if (abilityCharges > 0 && !game.gameOver && !gamePaused) {
|
||||
// --- FIX DI SINI: Tambahkan pengecekan !player1.dead ---
|
||||
if (abilityCharges > 0 && !game.gameOver && !gamePaused && !player1.dead) {
|
||||
useAbility();
|
||||
abilityCharges--;
|
||||
}
|
||||
@ -831,8 +832,6 @@ function addShips() {
|
||||
spawnEnemyFromWave(currentWave);
|
||||
currentWave.spawned++;
|
||||
// --- RANDOM SPACING ---
|
||||
// Membuat jarak muncul antar musuh bervariasi
|
||||
// Kadang cepat, kadang ada jeda.
|
||||
let randomSpacing =
|
||||
currentWave.spacing + Math.floor(Math.random() * 30);
|
||||
currentWave.spawnTimer = randomSpacing;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user