-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
40 lines (40 loc) · 1.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Defend your planet!</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Orbitron&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="passwordPrompt">
<h2>Add password to play</h2>
<img src="assets/planet.png" />
<input
type="password"
id="passwordInput"
placeholder="Enter password"
onkeydown="if(event.key==='Enter'){checkPassword()}"
/>
<button onclick="checkPassword()">Start Game</button>
</div>
<div id="gameContainer">
<canvas id="canvas1"></canvas>
<div class="hidden">
<img src="assets/planet.png" id="planet" />
<img src="assets/player.png" id="player" />
<img src="assets/asteroid.png" id="asteroid" />
<img src="assets/lobstermorph.png" id="lobster" />
<img src="assets/beetlemorph.png" id="beetle" />
<img src="assets/rhinomorph.png" id="rhino" />
</div>
</div>
<script src="script.js"></script>
</body>
</html>