-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
65 lines (60 loc) · 2.18 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./styles/style.css" />
<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=Bowlby+One&family=Jost:ital,wght@0,100..900;1,100..900&family=Ojuju:wght@200..800&family=Slackside+One&family=Trispace:wght@100..800&display=swap"
rel="stylesheet"
/>
<link href="https://fonts.cdnfonts.com/css/galactic" rel="stylesheet" />
<title>Interstellar Limbo!</title>
</head>
<body>
<div id="game-intro">
<p class="text" id="game-name">Interstellar <br />Limbo</p>
<div class="instructions">
<p>Left and right arrow keys to move!</p>
<p>-</p>
<p>Failure to catch items will trap you on the screen!</p>
<p>-</p>
<p>You have 30 seconds to survive!</p>
</div>
<button id="start-button">start</button>
</div>
<div id="game-container">
<div id="time-score">
<p>Score:<span id="score">0</span></p>
<div id="timeRemaining"><span>00:00</span></div>
</div>
<div id="game-screen"></div>
</div>
<div id="game-end">
<p class="text" id="result">Game Over</p>
<p class="text-mini" id="result-text">
You are trapped in multidimensional chaos...
</p>
<p class="text-mini">score:<span id="final-score">0</span></p>
<button id="restart-button">restart</button>
</div>
<audio
id="soundtrack"
src="sounds/interstellar-space-117482.mp3"
preload="auto"
loop
></audio>
<script type="text/javascript" src="js/obstacle.js"></script>
<script type="text/javascript" src="js/player.js"></script>
<script type="text/javascript" src="js/game.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script>
document.body.addEventListener("click", function () {
var audio = document.getElementById("soundtrack");
audio.play();
});
</script>
</body>
</html>