-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·64 lines (55 loc) · 2.24 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
<html>
<head>
<title>ScribbleShips: Pure JavaScript Daydream</title>
<link rel='shortcut icon' href='favicon.ico' type='image/x-icon'/ >
</head>
<body>
<header>
</header>
<script src="lib/movingObject.js"></script>
<script src="lib/util.js"></script>
<script src="lib/ship.js"></script>
<script src="lib/asteroid.js"></script>
<script src="lib/bullet.js"></script>
<script src="lib/game.js"></script>
<script src="lib/gameView.js"></script>
<script src="lib/keymaster.js"></script>
<script src="lib/powerup.js"></script>
<!-- <script type="text/javascript" src="/socket.io/socket.io.js"></script> -->
<link href="css/asteroids.css" rel="stylesheet" type="text/css" />
<section class="menu hidden" id="menu">
<div class="text-container">
<h1>Welcome to Scribbleships 101</h1>
<ul>
<li>Instructions:</li>
<li>Use your mouse to pilot your ship.</li>
<li>Click to shoot.</li>
<li>You will be invulnerable for 5 seconds after being destroyed.</li>
<li>When you have enough points, find the exit to move to the next level.</li>
<li>Press P to pause the game.</li>
<br>
<li class="tips">* Large asteroids may take more than one shot to crack.</li>
<li class="tips">* You will be invulnerable for 5 seconds after your ship spawns destroyed.</li>
</ul>
</div>
<div class="button-container">
<button id="start">Start</button>
<button class="hidden" id="resume">Resume</button>
<button class="hidden" id="restart">Restart</button>
</div>
</section>
<canvas class="canvas" id ="game-canvas"></canvas>
<script>
(function game() {
var canvasEl = document.getElementById("game-canvas");
new Asteroids.GameView().start(canvasEl);
// var socket = io.connect('/');
// //Now we can listen for that event
// socket.on('onconnected', function( data ) {
// //Note that the data is the object we sent from the server, as is. So we can assume its id exists.
// console.log( 'Connected successfully to the socket.io server. My server side ID is ' + data.id );
// });
}())
</script>
</body>
</html>