Ships Animation
This commit is contained in:
parent
9cb03ccf95
commit
634f614231
@ -215,8 +215,6 @@ function drawGame() {
|
|||||||
player1.invincible = 60;
|
player1.invincible = 60;
|
||||||
explosion_enemy.play();
|
explosion_enemy.play();
|
||||||
|
|
||||||
// --- POSISI RESPAWN TENGAH ---
|
|
||||||
// Menggunakan tinggi player yang sudah dihitung agar pas tengah
|
|
||||||
player1.x = 100;
|
player1.x = 100;
|
||||||
player1.y = canvasHeight / 2 - player1.height / 2;
|
player1.y = canvasHeight / 2 - player1.height / 2;
|
||||||
player1.vx = 0;
|
player1.vx = 0;
|
||||||
@ -377,7 +375,6 @@ class PlayerObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inisialisasi awal (Posisi Y akan di-override otomatis saat gambar load)
|
|
||||||
let player1 = new PlayerObject(100, 300);
|
let player1 = new PlayerObject(100, 300);
|
||||||
|
|
||||||
function drawNewText(txt, x, y, color) {
|
function drawNewText(txt, x, y, color) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user