cutechicken commited on
Commit
2403157
Β·
verified Β·
1 Parent(s): c4a4930

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +5 -7
index.html CHANGED
@@ -281,9 +281,9 @@
281
  return this.x < canvas.width;
282
  }
283
 
284
- shoot() {
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
- if (!this.hasPlayedMGSound) {
 
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