56 lines
3.2 KiB
HTML
56 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
|
<title>Гречка: Червяки — хотсит</title>
|
|
<style>
|
|
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #87CEEB; font-family: sans-serif; }
|
|
#game { position: fixed; inset: 0; }
|
|
#c { width: 100%; height: 100%; display: block; touch-action: none; }
|
|
#hud { position: fixed; top: 0; left: 0; right: 0; padding: 6px 8px; color: #fff; font-size: 14px;
|
|
text-shadow: 0 1px 3px #000; pointer-events: none; display: flex; gap: 12px; flex-wrap: wrap; }
|
|
#wbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; padding: 6px;
|
|
overflow-x: auto; background: rgba(0,0,0,0.45); }
|
|
.wbtn { flex: 1 0 auto; min-width: 86px; padding: 10px 6px; font-size: 13px; border-radius: 8px;
|
|
border: 2px solid transparent; background: #2d3436; color: #fff; }
|
|
.wbtn.sel { border-color: #f1c40f; background: #3d484b; }
|
|
.wbtn.empty { opacity: 0.35; }
|
|
#touch { position: fixed; right: 8px; bottom: 64px; display: none; flex-direction: column; gap: 8px; }
|
|
@media (pointer: coarse) { #touch { display: flex; } #wbar { bottom: 0; } }
|
|
.tbtn { width: 60px; height: 60px; border-radius: 50%; border: none; font-size: 24px;
|
|
background: rgba(0,0,0,0.5); color: #fff; }
|
|
#tAim { width: 60px; writing-mode: vertical-lr; direction: rtl; height: 140px; }
|
|
#move { position: fixed; left: 8px; bottom: 64px; display: none; gap: 8px; }
|
|
@media (pointer: coarse) { #move { display: flex; } }
|
|
#banner { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
|
|
background: rgba(0,0,0,0.6); z-index: 10; }
|
|
#banner .box { background: #fff; border-radius: 12px; padding: 24px 32px; text-align: center; }
|
|
#banner .b-text { font-size: 22px; margin-bottom: 16px; }
|
|
#again { font-size: 18px; padding: 10px 24px; border-radius: 8px; border: none; background: #27ae60; color: #fff; }
|
|
#help { position: fixed; left: 8px; top: 44px; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000;
|
|
pointer-events: none; opacity: 0.85; }
|
|
@media (pointer: coarse) { #help { display: none; } }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="game"><canvas id="c"></canvas></div>
|
|
<div id="hud"><span id="hudTeams"></span><span id="hudTurn"></span><span id="hudWind"></span><span id="hudWeapon"></span></div>
|
|
<div id="help">A/D — идти · W/S — прицел · Пробел (держать) — сила/выстрел · Shift — прыжок · Tab — оружие · F — таймер</div>
|
|
<div id="move">
|
|
<button class="tbtn" id="tLeft">◀</button>
|
|
<button class="tbtn" id="tRight">▶</button>
|
|
<button class="tbtn" id="tJump">⤒</button>
|
|
</div>
|
|
<div id="touch">
|
|
<input type="range" id="tAim" min="0" max="100" value="30">
|
|
<button class="tbtn" id="tFuse">⏱</button>
|
|
<button class="tbtn" id="tWeapon">🌀</button>
|
|
<button class="tbtn" id="tFire">🔥</button>
|
|
</div>
|
|
<div id="wbar"></div>
|
|
<div id="banner"><div class="box"><div class="b-text"></div><button id="again">Ещё бой</button></div></div>
|
|
<script src="worms.js?v=1"></script>
|
|
</body>
|
|
</html>
|