Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- index.html +5 -7
index.html
CHANGED
@@ -281,9 +281,9 @@
|
|
281 |
return this.x < canvas.width;
|
282 |
}
|
283 |
|
284 |
-
|
285 |
-
//
|
286 |
-
if (!this.hasPlayedSound) {
|
287 |
new Audio('bf109mg.ogg').play();
|
288 |
this.hasPlayedSound = true;
|
289 |
}
|
@@ -325,7 +325,8 @@
|
|
325 |
}
|
326 |
|
327 |
shoot() {
|
328 |
-
|
|
|
329 |
const mgSound = new Audio('ju87mg.ogg');
|
330 |
mgSound.volume = 1.0;
|
331 |
mgSound.currentTime = 0;
|
@@ -334,10 +335,7 @@
|
|
334 |
}
|
335 |
|
336 |
// 100x100 ν½μ
κΈ°μ€μΌλ‘ λ κ° μμΉ μ’ν μ€μ
|
337 |
-
// μΌμͺ½ λ κ°: [20, 50] (μΌμͺ½μμ 20px, μμμ 50px)
|
338 |
-
// μ€λ₯Έμͺ½ λ κ°: [80, 50] (μΌμͺ½μμ 80px, μμμ 50px)
|
339 |
[[20, 50], [80, 50]].forEach(([x, y]) => {
|
340 |
-
// μ΄λ―Έμ§ μ€μ¬μ (50,50)μΌλ‘ νμ¬ μ’ν λ³ν
|
341 |
const offsetX = x - 50;
|
342 |
const offsetY = y - 50;
|
343 |
|
|
|
281 |
return this.x < canvas.width;
|
282 |
}
|
283 |
|
284 |
+
shoot() {
|
285 |
+
// μΉ΄μ΄νΈλ€μ΄ μ€μ΄ μλ λλ§ μ리 μ¬μ
|
286 |
+
if (!this.hasPlayedSound && !isCountingDown) {
|
287 |
new Audio('bf109mg.ogg').play();
|
288 |
this.hasPlayedSound = true;
|
289 |
}
|
|
|
325 |
}
|
326 |
|
327 |
shoot() {
|
328 |
+
// μΉ΄μ΄νΈλ€μ΄ μ€μ΄ μλ λλ§ μ리 μ¬μ
|
329 |
+
if (!this.hasPlayedMGSound && !isCountingDown) {
|
330 |
const mgSound = new Audio('ju87mg.ogg');
|
331 |
mgSound.volume = 1.0;
|
332 |
mgSound.currentTime = 0;
|
|
|
335 |
}
|
336 |
|
337 |
// 100x100 ν½μ
κΈ°μ€μΌλ‘ λ κ° μμΉ μ’ν μ€μ
|
|
|
|
|
338 |
[[20, 50], [80, 50]].forEach(([x, y]) => {
|
|
|
339 |
const offsetX = x - 50;
|
340 |
const offsetY = y - 50;
|
341 |
|