-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsbreakout.html
55 lines (48 loc) · 1.29 KB
/
jsbreakout.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
<!--
George Frick
jsBreakout!
Spring 2009
An adventure in learning jQuery, more Javascript, and some CSS sprites.
-->
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<script src="lib/jquery.js"></script>
<script src="js/breakout.js"></script>
<link rel="stylesheet" href="/style/breakout.css" type="text/css">
</head>
<body>
<div id="console">
<div id="game" class="screen">
</div>
</div>
<div style=" position: absolute; top: 50px; left: 500px;">
jsBreakout! by George Frick.<br/>
Click in the game area to get started.
<hr/>
<ol>
<li>Left & Right Arrow to move paddle.</li>
<li>Space Bar to launch the ball.</li>
</ol>
</div>
</body>
<script>
$(document).ready(function () {
var theGame = new jsgame();
theGame.setup();
theGame.initTitle();
$(window).keydown(function (e) {
theGame.keyDownHandler(e, theGame)
});
$(window).keyup(function (e) {
theGame.keyUpHandler(e, theGame)
});
window.setInterval(function () {
theGame.gameLoop();
return this;
}, 10);
});
</script>
</html>