-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (47 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<title>meteors</title>
<meta charset="utf-8">
<link href="stylesheets/style.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script src="scripts/game.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var canvas = $("#gameCanvas");
var context = canvas.get(0).getContext("2d");
var game = new GameEngine();
game.init(context);
var player = new Player(GameEngine.halfSurfaceWidth, 550);
game.addPlayer(player);
});
</script>
</head>
<body>
<div id="game">
<div id="gameUI">
<div id="gameIntro">
<h1>Meteors</h1>
<p>
Click start and then any key to play. <br />
Use left and right cursor to avoid the evil meteors. <br />
May the gimmicks be with you.
</p>
<p><a id="gamePlay" class="button" href="">Start</a></p>
</div>
<div id="gameStats">
<p>Score: <span class="gameScore"></span></p>
<p><a class="gameReset" href="">Reset</a></p>
</div>
<div id="gameComplete">
<h1>Game over!</h1>
<p>Your points: <span class="gameScore"></span>
<p><a class="gameReset button" href="">Play again</a></p>
</div>
</div>
<canvas id="gameCanvas" width="800" height="600">
<!-- No canvas working here -->
</canvas>
</div>
</body>
</html>