cutechicken commited on
Commit
0eb0a0c
ยท
verified ยท
1 Parent(s): 835e5d3

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +17 -16
game.js CHANGED
@@ -2408,7 +2408,7 @@ class Game {
2408
  animateImpact();
2409
 
2410
  // ์ž‘์€ ์ถฉ๋Œ์Œ
2411
- try {
2412
  const impactSound = new Audio('sounds/hit.ogg');
2413
  impactSound.volume = 0.2;
2414
  impactSound.play().catch(e => {
@@ -2416,8 +2416,8 @@ class Game {
2416
  });
2417
  } catch (e) {
2418
  console.log('Impact sound error:', e);
2419
- }
2420
  }
 
2421
  checkCollisions() {
2422
  // ํ”Œ๋ ˆ์ด์–ด ํƒ„ํ™˜ vs ์ ๊ธฐ ์ถฉ๋Œ
2423
  for (let i = this.fighter.bullets.length - 1; i >= 0; i--) {
@@ -2561,18 +2561,19 @@ class Game {
2561
 
2562
  animateParticles();
2563
 
2564
- // ํ”ผ๊ฒฉ ์‚ฌ์šด๋“œ ์žฌ์ƒ
2565
- try {
2566
- const hitSound = new Audio('sounds/hit.ogg');
2567
- hitSound.volume = 0.3;
2568
- hitSound.play().catch(e => {
2569
- console.log('Hit sound not found or failed to play');
2570
- });
2571
- } catch (e) {
2572
- console.log('Hit sound error:', e);
2573
- }
2574
-
2575
- createExplosionEffect(position) {
 
2576
  // ํญ๋ฐœ์Œ์„ ๊ฐ€์žฅ ๋จผ์ € ์žฌ์ƒ (์‹œ๊ฐํšจ๊ณผ๋ณด๋‹ค ์šฐ์„ )
2577
  try {
2578
  const explosionSound = new Audio('sounds/bang.ogg');
@@ -2585,8 +2586,8 @@ try {
2585
  }
2586
  } catch (e) {
2587
  console.log('Explosion sound error:', e);
2588
- }
2589
- }
2590
  // ๋ฉ”์ธ ํญ๋ฐœ ํ”Œ๋ž˜์‹œ
2591
  const explosionGeometry = new THREE.SphereGeometry(50, 16, 16);
2592
  const explosionMaterial = new THREE.MeshBasicMaterial({
 
2408
  animateImpact();
2409
 
2410
  // ์ž‘์€ ์ถฉ๋Œ์Œ
2411
+ try {
2412
  const impactSound = new Audio('sounds/hit.ogg');
2413
  impactSound.volume = 0.2;
2414
  impactSound.play().catch(e => {
 
2416
  });
2417
  } catch (e) {
2418
  console.log('Impact sound error:', e);
 
2419
  }
2420
+ }
2421
  checkCollisions() {
2422
  // ํ”Œ๋ ˆ์ด์–ด ํƒ„ํ™˜ vs ์ ๊ธฐ ์ถฉ๋Œ
2423
  for (let i = this.fighter.bullets.length - 1; i >= 0; i--) {
 
2561
 
2562
  animateParticles();
2563
 
2564
+ / ํ”ผ๊ฒฉ ์‚ฌ์šด๋“œ ์žฌ์ƒ
2565
+ try {
2566
+ const hitSound = new Audio('sounds/hit.ogg');
2567
+ hitSound.volume = 0.3;
2568
+ hitSound.play().catch(e => {
2569
+ console.log('Hit sound not found or failed to play');
2570
+ });
2571
+ } catch (e) {
2572
+ console.log('Hit sound error:', e);
2573
+ }
2574
+ }
2575
+
2576
+ createExplosionEffect(position) {
2577
  // ํญ๋ฐœ์Œ์„ ๊ฐ€์žฅ ๋จผ์ € ์žฌ์ƒ (์‹œ๊ฐํšจ๊ณผ๋ณด๋‹ค ์šฐ์„ )
2578
  try {
2579
  const explosionSound = new Audio('sounds/bang.ogg');
 
2586
  }
2587
  } catch (e) {
2588
  console.log('Explosion sound error:', e);
2589
+ }
2590
+
2591
  // ๋ฉ”์ธ ํญ๋ฐœ ํ”Œ๋ž˜์‹œ
2592
  const explosionGeometry = new THREE.SphereGeometry(50, 16, 16);
2593
  const explosionMaterial = new THREE.MeshBasicMaterial({