-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
72 lines (72 loc) · 1.55 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
<!DOCTYPE html>
<html>
<head>
<title>HTML5/Canvas/Javascript tower defense game</title>
<meta name="description" content="A tower defense game made with JavaScript and Canvas.">
<style>
.right {
float:right;
}
.canvas {
float:left;
margin-right: 10px;
background:url(tower_background.png);
}
.tower {
display:inline-block;
padding: 5px;
border: 1px solid;
}
</style>
</head>
<body>
<canvas id='canvas' class='canvas' width='600' height='600' style='border:1px solid #000;'>Looks like HTML% canvas is turned off. Sorry, this tower defense game needs canvas to work</canvas>
<div class='tower' style='background-color: green;' onclick='changeTower(0);'>
Tower 1
<br>
Range: med
<br>
Damage: med
<br>
Rate: med
<br>
Cost: 50
</div>
<p>
<div class='tower' style='background-color: brown;' onclick='changeTower(1);'>
Tower 2
<br>
Range: long
<br>
Damage: med
<br>
Rate: high
<br>
Cost: 75
</div>
<p>
<div class='tower' style='background-color:aqua;' onclick='changeTower(2);'>
Tower 3
<br>
Range: short
<br>
Damage: high
<br>
Rate: med
<br>
Cost: 75
</div>
<br>
<div style='width:600px;'>
Attackers Score: <span id='attackersScore'>0</span>
<span class='right'>Money: <span id='money'>250</span></span>
<br>
Attackers Stopped: <span id='stopped'>0</span>
</div>
<script type='text/javascript' src='mainLoop.js'></script>
<script type='text/javascript' src='attackerUnits.js'></script>
<script type='text/javascript' src='towerUnits.js'></script>
<script type='text/javascript' src='bullets.js'></script>
<script type='text/javascript' src='mouseClick.js'></script>
</body>
</html>