Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
@@ -1293,6 +1293,61 @@ class Game {
|
|
1293 |
const existingStallWarnings = document.querySelectorAll('.stall-escape-warning');
|
1294 |
existingStallWarnings.forEach(w => w.remove());
|
1295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1296 |
if (this.fighter.warningBlinkState) {
|
1297 |
const warningContainer = document.createElement('div');
|
1298 |
warningContainer.className = 'warning-message';
|
@@ -1389,6 +1444,14 @@ class Game {
|
|
1389 |
0 0 60px rgba(255, 0, 0, 0.8);
|
1390 |
}
|
1391 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1392 |
`;
|
1393 |
document.head.appendChild(style);
|
1394 |
}
|
@@ -1581,6 +1644,11 @@ class Game {
|
|
1581 |
blurEffect.remove();
|
1582 |
}
|
1583 |
|
|
|
|
|
|
|
|
|
|
|
1584 |
const gameOverDiv = document.createElement('div');
|
1585 |
gameOverDiv.className = 'start-screen';
|
1586 |
gameOverDiv.style.display = 'flex';
|
|
|
1293 |
const existingStallWarnings = document.querySelectorAll('.stall-escape-warning');
|
1294 |
existingStallWarnings.forEach(w => w.remove());
|
1295 |
|
1296 |
+
// 고도 경고 외곽 효과
|
1297 |
+
let altitudeEdgeEffect = document.getElementById('altitudeEdgeEffect');
|
1298 |
+
if (this.fighter.altitude < 500) {
|
1299 |
+
if (!altitudeEdgeEffect) {
|
1300 |
+
altitudeEdgeEffect = document.createElement('div');
|
1301 |
+
altitudeEdgeEffect.id = 'altitudeEdgeEffect';
|
1302 |
+
document.body.appendChild(altitudeEdgeEffect);
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
let edgeIntensity;
|
1306 |
+
if (this.fighter.altitude < 250) {
|
1307 |
+
// PULL UP 경고 - 강한 붉은 효과
|
1308 |
+
edgeIntensity = 0.6;
|
1309 |
+
altitudeEdgeEffect.style.cssText = `
|
1310 |
+
position: fixed;
|
1311 |
+
top: 0;
|
1312 |
+
left: 0;
|
1313 |
+
width: 100%;
|
1314 |
+
height: 100%;
|
1315 |
+
pointer-events: none;
|
1316 |
+
z-index: 1300;
|
1317 |
+
background: radial-gradient(ellipse at center,
|
1318 |
+
transparent 40%,
|
1319 |
+
rgba(255, 0, 0, ${edgeIntensity * 0.3}) 60%,
|
1320 |
+
rgba(255, 0, 0, ${edgeIntensity}) 100%);
|
1321 |
+
box-shadow: inset 0 0 150px rgba(255, 0, 0, ${edgeIntensity}),
|
1322 |
+
inset 0 0 100px rgba(255, 0, 0, ${edgeIntensity * 0.8});
|
1323 |
+
animation: pulse-red 0.5s infinite;
|
1324 |
+
`;
|
1325 |
+
} else {
|
1326 |
+
// LOW ALTITUDE 경고 - 약한 붉은 효과
|
1327 |
+
edgeIntensity = 0.3;
|
1328 |
+
altitudeEdgeEffect.style.cssText = `
|
1329 |
+
position: fixed;
|
1330 |
+
top: 0;
|
1331 |
+
left: 0;
|
1332 |
+
width: 100%;
|
1333 |
+
height: 100%;
|
1334 |
+
pointer-events: none;
|
1335 |
+
z-index: 1300;
|
1336 |
+
background: radial-gradient(ellipse at center,
|
1337 |
+
transparent 50%,
|
1338 |
+
rgba(255, 0, 0, ${edgeIntensity * 0.2}) 70%,
|
1339 |
+
rgba(255, 0, 0, ${edgeIntensity}) 100%);
|
1340 |
+
box-shadow: inset 0 0 100px rgba(255, 0, 0, ${edgeIntensity}),
|
1341 |
+
inset 0 0 50px rgba(255, 0, 0, ${edgeIntensity * 0.5});
|
1342 |
+
`;
|
1343 |
+
}
|
1344 |
+
} else {
|
1345 |
+
// 고도가 안전하면 효과 제거
|
1346 |
+
if (altitudeEdgeEffect) {
|
1347 |
+
altitudeEdgeEffect.remove();
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
|
1351 |
if (this.fighter.warningBlinkState) {
|
1352 |
const warningContainer = document.createElement('div');
|
1353 |
warningContainer.className = 'warning-message';
|
|
|
1444 |
0 0 60px rgba(255, 0, 0, 0.8);
|
1445 |
}
|
1446 |
}
|
1447 |
+
@keyframes pulse-red {
|
1448 |
+
0%, 100% {
|
1449 |
+
opacity: 1;
|
1450 |
+
}
|
1451 |
+
50% {
|
1452 |
+
opacity: 0.7;
|
1453 |
+
}
|
1454 |
+
}
|
1455 |
`;
|
1456 |
document.head.appendChild(style);
|
1457 |
}
|
|
|
1644 |
blurEffect.remove();
|
1645 |
}
|
1646 |
|
1647 |
+
const altitudeEffect = document.getElementById('altitudeEdgeEffect');
|
1648 |
+
if (altitudeEffect) {
|
1649 |
+
altitudeEffect.remove();
|
1650 |
+
}
|
1651 |
+
|
1652 |
const gameOverDiv = document.createElement('div');
|
1653 |
gameOverDiv.className = 'start-screen';
|
1654 |
gameOverDiv.style.display = 'flex';
|