Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
@@ -352,6 +352,14 @@ class Fighter {
|
|
352 |
abnormalG += baseG * altitudeMultiplier * (1 + throttleGMultiplier); // ์ค๋กํ ๋ฐฐ์จ ์ถ๊ฐ
|
353 |
}
|
354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
// ํผ์น ๊ฐ๋๊ฐ ยฑ40๋ ์ด์์ผ ๋ ์ถ๊ฐ G-Force
|
356 |
if (pitchDegrees >= 40) {
|
357 |
// 40๋ ์ด์์ผ ๋ ๊ธ๊ฒฉํ G-Force ์ฆ๊ฐ
|
@@ -411,12 +419,13 @@ class Fighter {
|
|
411 |
if (this.overG) {
|
412 |
this.overGTimer += deltaTime;
|
413 |
|
414 |
-
// 1
|
415 |
-
if (this.overGTimer > 1.
|
416 |
-
// ์๋ ๊ธ๊ฒฉํ ๊ฐ์ (
|
417 |
-
|
418 |
-
|
419 |
-
|
|
|
420 |
}
|
421 |
} else {
|
422 |
this.overGTimer = 0; // Over-G ์ํ๊ฐ ์๋๋ฉด ํ์ด๋จธ ๋ฆฌ์
|
|
|
352 |
abnormalG += baseG * altitudeMultiplier * (1 + throttleGMultiplier); // ์ค๋กํ ๋ฐฐ์จ ์ถ๊ฐ
|
353 |
}
|
354 |
|
355 |
+
// ๋กค์ด ยฑ30๋ ์ด์์ผ ๋ ์ถ๊ฐ G-Force
|
356 |
+
const rollDegrees = Math.abs(this.rotation.z) * (180 / Math.PI);
|
357 |
+
if (rollDegrees > 30) {
|
358 |
+
// 30๋ ์ด๊ณผ๋ถ๋น 0.1G ์ถ๊ฐ
|
359 |
+
const extremeRollG = (rollDegrees - 30) * 0.1;
|
360 |
+
abnormalG += extremeRollG * altitudeMultiplier * (1 + throttleGMultiplier);
|
361 |
+
}
|
362 |
+
|
363 |
// ํผ์น ๊ฐ๋๊ฐ ยฑ40๋ ์ด์์ผ ๋ ์ถ๊ฐ G-Force
|
364 |
if (pitchDegrees >= 40) {
|
365 |
// 40๋ ์ด์์ผ ๋ ๊ธ๊ฒฉํ G-Force ์ฆ๊ฐ
|
|
|
419 |
if (this.overG) {
|
420 |
this.overGTimer += deltaTime;
|
421 |
|
422 |
+
// 1์ด ์ด์ Over-G ์ํ์ผ ๊ฒฝ์ฐ ์์ผ ํ๋ฆผ ์์
|
423 |
+
if (this.overGTimer > 1.0) {
|
424 |
+
// ์๋ ๊ธ๊ฒฉํ ๊ฐ์ (1.5์ด๋ถํฐ)
|
425 |
+
if (this.overGTimer > 1.5) {
|
426 |
+
targetSpeed *= Math.max(0, 1 - (this.overGTimer - 1.5) * 0.5);
|
427 |
+
}
|
428 |
+
// ์์ผ ํ๋ฆผ ํจ๊ณผ๋ UI์์ ์ฒ๋ฆฌ (1์ด๋ถํฐ)
|
429 |
}
|
430 |
} else {
|
431 |
this.overGTimer = 0; // Over-G ์ํ๊ฐ ์๋๋ฉด ํ์ด๋จธ ๋ฆฌ์
|