Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
|
@@ -2408,7 +2408,7 @@ class Game {
|
|
| 2408 |
animateImpact();
|
| 2409 |
|
| 2410 |
// ์์ ์ถฉ๋์
|
| 2411 |
-
|
| 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 |
-
|
| 2567 |
-
|
| 2568 |
-
|
| 2569 |
-
|
| 2570 |
-
|
| 2571 |
-
} catch (e) {
|
| 2572 |
-
|
| 2573 |
-
}
|
| 2574 |
-
|
| 2575 |
-
|
|
|
|
| 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({
|