-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (69 loc) · 2.07 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
<!DOCTYPE html>
<head>
<title>Shooter</title>
<style>
#score_text {
display: none;
position: absolute;
font-size: 25px;
color: red;
margin-left: 355px;
}
#score_value,
#life_value {
font-size: 25px;
}
button {
position: absolute;
width: 100px;
padding: 10px 0;
background: #299a0b;
color: #fff;
font-size: 16px;
font-weight: bold;
font-style: italic;
border: none;
border-radius: 5px;
box-shadow: inset 0px 0px 8px 2px #428709;
text-shadow: 1px 1px 1px #666;
margin-top: 20px;
margin-left: 130px;
}
canvas {
position: absolute;
margin-top: 95px;
}
#result {
display: none;
position: absolute;
font-size: 25px;
color: blueviolet;
margin-top: 62px;
margin-left: 254px;
}
</style>
</head>
<body>
<header><h2>Shooter</h2></header>
<section id="game_description">
Press A/S keys to move the space-ship left/right. Press and hold SPACE-BAR to fire.
</section>
<section id="panel">
<button class="start_game">Start</button>
<p id="score_text">Remaining Life: <span id="life_value"></span> Score is: <span id="score_value"></span> </p>
<p id="result">Game Over !!</p>
<canvas id="canvas_region" width="700" height="497"></canvas>
</section>
<audio id="alien_explosion">
<source src="sounds/alien_explosion.mp3" type="audio/mpeg">
</audio>
<audio id="bullet">
<source src="sounds/bullet.mp3" type="audio/mpeg">
</audio>
<audio id="spaceship_movement">
<source src="sounds/spaceship_movement.mp3" type="audio/mpeg">
</audio>
<script src="scripts/jquery_1.9.1.js"></script>
<script src="scripts/canvas.js"></script>
</body>
</html>