Vietnam jungle theme, mech spider boss, ending scene, improved graphics

This commit is contained in:
m.kamzabaev 2026-07-31 11:13:05 +00:00
parent 39a95e7337
commit 22410c3a6c
3 changed files with 541 additions and 352 deletions

View File

@ -2,21 +2,21 @@
<html lang="ru"> <html lang="ru">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Contra-style Shooter</title> <title>Vietnam Shooter</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<div id="game-container"> <div id="game-container">
<canvas id="game"></canvas> <canvas id="game"></canvas>
<div id="ui"> <div id="ui">
<div id="health">HP: <span id="hp">100</span>/<span id="maxhp">100</span></div> <div>HP: <span id="hp">100</span>/<span id="maxhp">100</span></div>
<div id="weapon">Оружие: <span id="wpn">Пистолет</span></div> <div>Оружие: <span id="wpn">Пистолет</span></div>
<div id="wave">Волна: <span id="wave-num">1</span> (<span id="wprogress">5/5</span>)</div> <div>Волна: <span id="wave-num">1</span> (<span id="wprogress">6/6</span>)</div>
<div id="score">Счёт: <span id="scr">0</span></div> <div>Счёт: <span id="scr">0</span></div>
<button id="pause-btn" onclick="togglePause()">⏸ Пауза</button>
</div> </div>
<button id="pause-btn" onclick="togglePause()">⏸ Пауза</button>
<div id="controls-hint"> <div id="controls-hint">
← → — бег | ↑ — прыжок | Z — стрельба | X — сменить оружие ← → — бег | Пробел — прыжок | Z — огонь | ↑ — прицел вверх | X — смена оружия | P — пауза
</div> </div>
</div> </div>
<script src="script.js"></script> <script src="script.js"></script>

834
script.js

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ body {
#game { #game {
display: block; display: block;
background: linear-gradient(to bottom, #16213e 0%, #1a1a2e 100%); background: linear-gradient(to bottom, #87CEEB 0%, #98D8C8 50%, #6B8E6B 100%);
} }
#ui { #ui {
@ -33,21 +33,40 @@ body {
right: 10px; right: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
color: #fff; color: #fff;
font-size: 18px; font-size: 16px;
font-weight: bold; font-weight: bold;
text-shadow: 2px 2px 4px rgba(0,0,0,0.8); text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
pointer-events: none; pointer-events: none;
} }
#ui div { #ui div {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.6);
padding: 8px 12px; padding: 8px 12px;
border-radius: 4px; border-radius: 4px;
border: 2px solid #4a4a6a; border: 2px solid #4a4a6a;
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
} }
#pause-btn {
background: rgba(0, 0, 0, 0.6);
color: #fff;
border: 2px solid #4a4a6a;
padding: 8px 16px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
pointer-events: auto;
}
#pause-btn:hover {
background: rgba(74, 74, 106, 0.8);
border-color: #6a6a8a;
}
#controls-hint { #controls-hint {
position: absolute; position: absolute;
bottom: -35px; bottom: -35px;
@ -61,23 +80,3 @@ body {
pointer-events: none; pointer-events: none;
white-space: nowrap; white-space: nowrap;
} }
#pause-btn {
position: absolute;
top: 10px;
right: 10px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border: 2px solid #4a4a6a;
padding: 8px 16px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
}
#pause-btn:hover {
background: rgba(74, 74, 106, 0.8);
border-color: #6a6a8a;
}