-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
73 lines (59 loc) · 2.5 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
<!DOCTYPE html>
<html>
<head id="header">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>Block Racer</title>
<script src="js/jquery.js"></script>
<style type="text/css">
html { background: black; }
#details { margin: 0 auto; width: 1000px; margin-top: 25px; font-family: Arial; color: white; font-weight: bold; font-size: 14px; }
#game { margin: 0 auto; margin-top: 10px; width: 1000px; height: 750px; }
#playerID { color: white; font-family: Verdana; }
img { display: none; }
#nameVal, #saveName { border: none; padding: 10px; }
#saveName { background-color: green; color: white; cursor: pointer; margin-right: 20px;}
#you { margin-left: 30px;}
</style>
</head>
<body>
<div id="details">
<input type="text" value="" name="name" id="nameVal" autocomplete="off" placeholder="Your name"/> <input type="submit" name="submit" id="saveName" value="Go" />Display Names: <input type="checkbox" value="" id="displayNames"/><span id="you"></span>
</div>
<img id="carBitmap" src="images/cars.png" />
<img id="skidBitmap" src="images/skids.png" />
<div id="game"></div>
<script src="http://localhost:8080/socket.io/socket.io.js"></script>
<script src="js/maths.js" type="text/javascript"></script>
<script src="js/calcHash.js" type="text/javascript"></script>
<script src="js/particleEngine.js" type="text/javascript"></script>
<script src="js/bullet.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/player.js" type="text/javascript"></script>
<script src="js/skid.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script type="text/javascript">
$("#nameVal").focus();
$("#displayNames").change(function() {
if ($(this).attr("checked") == "checked")
dispNames = true;
else
dispNames = false;
});
$("#nameVal").keyup(function(e) {
if (e.keyCode == 13) {
$("#saveName").click();
}
});
var toggleOnce = false;
$("#saveName").click(function() {
if (toggleOnce) { location.reload(true); return false; }
toggleOnce = true;
playerName = $("#nameVal").val() + Math.floor(Math.random() * 101);
$(this).attr("value", "Refresh");
init();
});
</script>
</body>
</html>