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.
70 lines
2.6 KiB
70 lines
2.6 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>Lives</span>
|
|
<strong id="lives">3</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="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="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><kbd>WASD</kbd><kbd>Arrow</kbd><span>Move</span></div>
|
|
<div><kbd>Space</kbd><span>Fire</span></div>
|
|
<div><kbd>P</kbd><span>Pause</span></div>
|
|
<div><kbd>Esc</kbd><span>End</span></div>
|
|
<div><kbd>Enter</kbd><span>Start / Restart</span></div>
|
|
</footer>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="./src/game.js"></script>
|
|
</body>
|
|
</html>
|