cutechicken commited on
Commit
49af122
ยท
verified ยท
1 Parent(s): 5788f4b

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +15 -6
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.5์ดˆ ์ด์ƒ Over-G ์ƒํƒœ์ผ ๊ฒฝ์šฐ
415
- if (this.overGTimer > 1.5) {
416
- // ์†๋„ ๊ธ‰๊ฒฉํžˆ ๊ฐ์†Œ (0kt๊นŒ์ง€)
417
- targetSpeed *= Math.max(0, 1 - (this.overGTimer - 1.5) * 0.5);
418
-
419
- // ์‹œ์•ผ ํ๋ฆผ ํšจ๊ณผ๋Š” UI์—์„œ ์ฒ˜๋ฆฌ
 
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 ์ƒํƒœ๊ฐ€ ์•„๋‹ˆ๋ฉด ํƒ€์ด๋จธ ๋ฆฌ์…‹