You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
3.5 KiB
82 lines
3.5 KiB
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>坦克大战</title>
|
|
<link rel="stylesheet" href="./src/styles.css" />
|
|
</head>
|
|
<body>
|
|
<main class="shell">
|
|
<section class="game-panel" aria-label="坦克大战游戏">
|
|
<header class="topbar">
|
|
<div class="brand">
|
|
<span class="rank-mark" aria-hidden="true"></span>
|
|
<div>
|
|
<p class="eyebrow">Web Arcade</p>
|
|
<h1>坦克大战</h1>
|
|
</div>
|
|
</div>
|
|
<div id="hud" class="hud" aria-live="polite">
|
|
<div class="hud-item">
|
|
<span>Score</span>
|
|
<strong id="score">0</strong>
|
|
</div>
|
|
<div class="hud-item">
|
|
<span>Health</span>
|
|
<strong id="lives">100%</strong>
|
|
</div>
|
|
<div class="hud-item">
|
|
<span>Enemies</span>
|
|
<strong id="enemies">0</strong>
|
|
</div>
|
|
<div class="status-chip" id="statusChip" aria-live="polite">待命</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="action-group" aria-label="游戏操作">
|
|
<button id="startAction" type="button">开始</button>
|
|
<button id="pauseAction" class="secondary-action" type="button">暂停</button>
|
|
<button id="stopAction" class="danger-action" type="button">结束</button>
|
|
</div>
|
|
|
|
<div class="stage-wrap">
|
|
<canvas id="game" width="800" height="600" aria-label="Tank Battle canvas"></canvas>
|
|
<div id="overlay" class="overlay">
|
|
<div class="overlay-content">
|
|
<p class="status-label" id="statusLabel">Ready</p>
|
|
<h2 id="statusTitle">Defend the field</h2>
|
|
<p id="statusText">Press Enter or tap Start to roll out.</p>
|
|
<div class="overlay-actions">
|
|
<button id="primaryAction" type="button">Start</button>
|
|
<button id="endAction" class="secondary-action" type="button">结束</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="controls">
|
|
<div class="touch-controls" aria-label="触摸操作">
|
|
<div class="dpad" aria-label="方向控制">
|
|
<button class="touch-button dpad-up" type="button" data-control="up" aria-label="向上">▲</button>
|
|
<button class="touch-button dpad-left" type="button" data-control="left" aria-label="向左">◀</button>
|
|
<button class="touch-button dpad-down" type="button" data-control="down" aria-label="向下">▼</button>
|
|
<button class="touch-button dpad-right" type="button" data-control="right" aria-label="向右">▶</button>
|
|
</div>
|
|
<button id="fireAction" class="fire-action" type="button" aria-label="开火">开火</button>
|
|
</div>
|
|
<div class="key-hints" aria-label="键盘快捷键">
|
|
<div class="key-hint"><kbd>WASD</kbd><kbd>↑↓←→</kbd><span>Move</span></div>
|
|
<div class="key-hint"><kbd>Space</kbd><span>Fire</span></div>
|
|
<div class="key-hint"><kbd>P</kbd><span>Pause</span></div>
|
|
<div class="key-hint"><kbd>Esc</kbd><span>End</span></div>
|
|
<div class="key-hint"><kbd>Enter</kbd><span>Start / Restart</span></div>
|
|
</div>
|
|
</footer>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="./src/game.js"></script>
|
|
</body>
|
|
</html>
|