-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
59 lines (50 loc) · 1.51 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Johufly</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="css/style.css">
<!-- Lib files -->
<script src="js/lib/class.js"></script>
<!-- Before states -->
<script src="js/points.js"></script>
<script src="js/polygon.js"></script>
<script src="js/ship.js"></script>
<script src="js/asteroid.js"></script>
<script src="js/bullet.js"></script>
<script src="js/wall.js"></script>
<script src="js/part.js"></script>
<script src="js/container.js"></script>
<script src="js/depot.js"></script>
<!-- States -->
<script src="js/state.js"></script>
<script src="js/gameState.js"></script>
<script src="js/menuState.js"></script>
<script src="js/endState.js"></script>
<!-- Managers and listeners -->
<script src="js/canvas.js"></script>
<script src="js/input.js"></script>
<!-- Main file -->
<script src="js/main.js"></script>
</head>
<body>
<input type="text" id="namefield">
<div style="background-color:#fff;position:absolute;top:0;width:200px;height:50px;">
<audio id="music" src="johuflymaintheme.wav" type="audio/wav" loop></audio>
<p id="musicon">Turn music on!</p>
<p id="musicoff">Turn music off!</p>
</div>
<script>
// create, initiate and run game
var game = new Game();
game.run();
document.getElementById("musicon").onclick = function () {
document.getElementById('music').play();
};
document.getElementById("musicoff").onclick = function () {
document.getElementById('music').pause();
};
</script>
</body>
</html>