-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
118 lines (106 loc) · 3.87 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
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width,height=device-height,target-densitydpi=device-dpi,user-scalable=yes" />
<script type="text/javascript" src="scripts/core/Loader.js"></script>
<script type="text/javascript" src="scripts/core/GameEngine.js"></script>
<script type="text/javascript" src="scripts/core/Utilities.js"></script>
<script type="text/javascript" src="scripts/core/Class.js"></script>
<script type="text/javascript" src="scripts/core/Map.js"></script>
<script type="text/javascript" src="scripts/core/Gameplay.js"></script>
<script type="text/javascript" src="scripts/core/InputEngine.js"></script>
<script type="text/javascript" src="scripts/core/SoundManager.js"></script>
<script type="text/javascript" src="scripts/core/Drawer.js"></script>
<script type="text/javascript" src="scripts/core/box2D.js"></script>
<script type="text/javascript" src="scripts/core/PhysicsEngine.js"></script>
<script type="text/javascript" src="scripts/Turrets/SimpleTurret.js"></script>
<script type="text/javascript" src="scripts/Ships/SimpleShip.js"></script>
<script type="text/javascript" src="scripts/Ammo/Bullet.js"></script>
<script type="text/javascript" src="scripts/Effects/Explosion.js"></script>
<script type="text/javascript" src="scripts/Effects/Lifebar.js"></script>
<script type="text/javascript" src="scripts/Ships/Asteroid.js"></script>
<script type="text/javascript" src="scripts/core/start.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<!--//effect scripts-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<!--//-->
<style>
body {
background-color: #090909;
color: white;
font-family: "Trebuchet MS", Verdana, sans-serif;
}
#Space {
background-color: black;
box-shadow: 0 0 5px #333;
display: block;
width: 630px;
font-size: 90%;
text-shadow: 1px 1px 0 black;
text-align: center;
}
.MenuButton {
padding-top: 10px;
font-size: 22px;
cursor: pointer;
}
#Space {
text-align: center;
width: 800px;
height: 600px;
margin: 0px auto;
border: 1px solid #678;
}
h2 {
font-weight: bold;
text-align: center;
padding: 5px 0;
font-size: 300%;
text-transform: uppercase;
}
#canvasHolder
{
position: fixed;
width: 100%;
height: 100%;
text-align:center;
}
#canvasHolder canvas
{
margin-left:auto;
margin-right:auto;
}
</style>
</head>
<body>
<div id="Space">
<div id="SplashScreen">
<h2>Space Defence</h2>
<div id="StartButton" class="MenuButton">Play!</div>
<div id="StartMusic" class="MenuButton">Music OFF</div>
</div>
</div>
<div id="canvasHolder"></div>
<script>
$("#StartButton").click(function () {
$("#Space").remove();
var holder = $("#canvasHolder");
var h = holder.innerHeight();
var w = 800* (h/600);
holder.html('<canvas id="canvas" width="'+w+'px" height="'+h+'px"></canvas>');
SoundManager.nextTrack();
startGame();
});
$("#StartMusic").click(function () {
SoundManager.maudio.pause();
});
$(".MenuButton").mouseenter(function () {
// $(this).css("background-color","gray");
$(this).effect("shake", { times:3 }, 500);
});
</script>
</body>
</html>