/
index.html
executable file
·112 lines (100 loc) · 4.68 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Asteroids</title>
<link href="lib/css/style.css" rel="stylesheet" type="text/css" charset="utf-8">
<link rel="apple-touch-icon" sizes="57x57" href="lib/images/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="lib/images/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="lib/images/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="lib/images/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="lib/images/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="lib/images/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="lib/images/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="lib/images/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="lib/images/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="lib/images/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="lib/images/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="lib/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="lib/images/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="lib/images/favicons/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<script src="lib/javascripts/jquery-2.1.1.js"></script>
<script src="lib/javascripts/underscore.js"></script>
<script src="lib/javascripts/keymaster.js"></script>
<script src="lib/javascripts/utils.js"></script>
<script src="lib/javascripts/movingObject.js"></script>
<script src="lib/javascripts/asteroid.js"></script>
<script src="lib/javascripts/bullet.js"></script>
<script src="lib/javascripts/explosion.js"></script>
<script src="lib/javascripts/game.js"></script>
<script src="lib/javascripts/gameView.js"></script>
<script src="lib/javascripts/ship.js"></script>
</head>
<body>
<section id='container'>
<section id='sidebar'>
<section id='board'>
<div id="modal-screen" class='show'>
<div id="menu">
<div id="menu-container">
<h2>Difficulty</h2>
<button class="btn menu-btn" data-level='0'>Tourist</button>
<button class="btn menu-btn" data-level='1'>Deck Hand</button>
<button class="btn menu-btn" data-level='2'>Gunner</button>
<button class="btn menu-btn" data-level='3'>Commander</button>
</div>
</div>
</div>
<canvas id="game-canvas"></canvas>
<div id="game-over" class='show hide'>
<h2>Game Over</h2>
<button class='btn new-game-btn'>New Game</button>
</div>
</section>
<header>
<img src="lib/images/asteroids_logo.jpg"/>
</header>
<section class='side-frame'>
<h3>SCORE</h3>
<div id='score'>0</div>
</section>
<section class='side-frame'>
<h3>LIVES</h3>
<div id='lives'>5</div>
</section>
<button class='btn new-game-btn'>New Game</button>
<!-- <h3 id='controls'>Controls</h3> -->
<h4>Fire</h4>
<h5 class='fire'>space</h5>
<h4>Forward Thrust</h4>
<h5 class='thrust'>↑</h5>
<h4>Backward Thrust</h4>
<h5 class='thrust'>↓</h5>
<h4>Rotate Left</h4>
<h5 class='turn'>←</h5>
<h4>Rotate Right</h4>
<h5 class='turn'>→</h5>
</section>
</section>
<script>
$(document).ready(function() {
windowHeight = $(window).innerHeight();
$('#sidebar').css('height', windowHeight - 5);
$('#board').css('height', windowHeight - 5);
windowWidth = $(window).innerWidth();
$('#board').css('width', windowWidth - 205);
var canvasEl = document.getElementById("game-canvas");
canvasEl.height = $('#board').innerHeight();
canvasEl.width = $('#board').innerWidth();
var context = canvasEl.getContext("2d");
Frame_Rate = 2;
currentGame = new Asteroids.Game(canvasEl.width, canvasEl.height);
gameView = new Asteroids.GameView(context);
gameView.start();
});
</script>
<script charset="utf-8"></script>
</body>
</html>