Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
@@ -60,6 +60,9 @@ class Fighter {
|
|
60 |
this.bullets = [];
|
61 |
this.lastShootTime = 0;
|
62 |
|
|
|
|
|
|
|
63 |
// ์นด๋ฉ๋ผ ์ค์
|
64 |
this.cameraDistance = 250;
|
65 |
this.cameraHeight = 30;
|
@@ -373,7 +376,7 @@ class Fighter {
|
|
373 |
}
|
374 |
|
375 |
// ์คํจ ํ์ถ ์กฐ๊ฑด: Fํค๋ฅผ ๋๋ฅด๊ณ ์๊ณ , ๊ธฐ์๊ฐ ์๋๋ฅผ ํฅํ๊ณ ์๊ณ , ์๋๊ฐ ์ถฉ๋ถํ ๋
|
376 |
-
if (this.stallWarning && this.
|
377 |
// Fํค๋ฅผ ๋๋ฅด๊ณ ์์ ๋๋ง ์คํจ ํ์ถ
|
378 |
this.stallWarning = false;
|
379 |
}
|
@@ -1271,6 +1274,9 @@ class Game {
|
|
1271 |
this.lastTime = currentTime;
|
1272 |
|
1273 |
if (this.isLoaded && this.fighter.isLoaded) {
|
|
|
|
|
|
|
1274 |
this.fighter.updateControls(this.keys, deltaTime);
|
1275 |
this.fighter.updatePhysics(deltaTime);
|
1276 |
this.fighter.updateBullets(this.scene, deltaTime);
|
|
|
60 |
this.bullets = [];
|
61 |
this.lastShootTime = 0;
|
62 |
|
63 |
+
// ์คํจ ํ์ถ์ ์ํ Fํค ์ํ
|
64 |
+
this.escapeKeyPressed = false;
|
65 |
+
|
66 |
// ์นด๋ฉ๋ผ ์ค์
|
67 |
this.cameraDistance = 250;
|
68 |
this.cameraHeight = 30;
|
|
|
376 |
}
|
377 |
|
378 |
// ์คํจ ํ์ถ ์กฐ๊ฑด: Fํค๋ฅผ ๋๋ฅด๊ณ ์๊ณ , ๊ธฐ์๊ฐ ์๋๋ฅผ ํฅํ๊ณ ์๊ณ , ์๋๊ฐ ์ถฉ๋ถํ ๋
|
379 |
+
if (this.stallWarning && this.escapeKeyPressed && pitchAngle > 0.2 && speedKnots > GAME_CONSTANTS.STALL_SPEED + 50) {
|
380 |
// Fํค๋ฅผ ๋๋ฅด๊ณ ์์ ๋๋ง ์คํจ ํ์ถ
|
381 |
this.stallWarning = false;
|
382 |
}
|
|
|
1274 |
this.lastTime = currentTime;
|
1275 |
|
1276 |
if (this.isLoaded && this.fighter.isLoaded) {
|
1277 |
+
// Fํค ์ํ๋ฅผ Fighter์ ์ ๋ฌ
|
1278 |
+
this.fighter.escapeKeyPressed = this.keys.f;
|
1279 |
+
|
1280 |
this.fighter.updateControls(this.keys, deltaTime);
|
1281 |
this.fighter.updatePhysics(deltaTime);
|
1282 |
this.fighter.updateBullets(this.scene, deltaTime);
|