-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (86 loc) · 3.55 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Asteroid Hell</title>
<link rel="stylesheet" href="lib/game_style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body class="clearfix">
<section class="topbar">
<figure id="money-figure" class="money info-figure"
money="0">You Have No Money!</figure>
<h1>Asteroid Hell</h1>
<figure id="lives-figure" class="lives info-figure"
lives="5">You Have 5 Lives</figure>
</section>
<section class="asteroids-game clearfix">
<canvas id="asteroids-canvas">
</canvas>
<section class="asteroids-game-overlay">
<section class = "left-bar side-bar hideme">
<figure id="weapons-menu" class="weapons-menu menu"></figure>
</section>
<section class = "right-bar side-bar hideme">
<figure id="shields-menu" class="shields-menu menu"></figure>
</section>
<article class="message message-zero before-display">
<p> The Asteroids must be destroyed. </p>
<p> Shoot the small ones to earn money.</p>
<p> The more you destroy, the faster and stronger they spawn. </p>
<br>
<p> In the long run, we are all dead. </p>
<p> (Press Enter) </p>
</article>
<article class="message message-one before-display">
<p> <i class="fa fa-caret-square-o-left"></i>
and <i class="fa fa-caret-square-o-right"></i> to
turn. <i class="fa fa-caret-square-o-up"></i> to move forward. </p>
<p class="shoot"> Space or Shift to Shoot </p>
<p class="pause"> P or Escape to Pause.</p>
<br>
<figure id="start-menu" class="start-menu menu"></figure>
</article>
<article class="center-message side-bar display hideme">
<p> Enter to buy. </p>
<p> E to equip. </p>
<p> U to unequip. </p>
<p> P or Escape to unpause. </p>
<br>
<p> Like Sisyphus, you must find contentment in a task that
will never be completed.</p>
</article>
</section>
<section class="footbar clearfix">
<a class="portfolio" href="http://dan-herr.com">Author's Portfolio</a>
<a class="github" href="http://github.com/danherr/asteroids">Github</a>
</section>
</section>
<script src="not_invented_here/keymaster/keymaster.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="lib/utils.js"></script>
<script src="lib/movingObject.js"></script>
<script src="lib/asteroid.js"></script>
<script src="lib/bullet.js"></script>
<script src="lib/ship_params.js"></script>
<script src="lib/ship.js"></script>
<script src="lib/game.js"></script>
<script src="lib/menu.js"></script>
<script src="lib/gameView.js"></script>
<script type="text/javascript">
var canvasEl = document.getElementById("asteroids-canvas");
canvasEl.height = window.innerHeight - 130;
canvasEl.width = window.innerWidth - 22;
ctx = canvasEl.getContext("2d");
var game = new window.Asteroids.Game(
canvasEl.width,
canvasEl.height
);
var menu = new window.Asteroids.WeaponMenu({
game: game,
JQDomElement: $("#weapons-menu"),
});
new window.Asteroids.GameView(game, ctx, menu).start();
</script>
</body>
</html>