-
Notifications
You must be signed in to change notification settings - Fork 0
/
spaceinvaders.html
54 lines (49 loc) · 1.47 KB
/
spaceinvaders.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
<html>
<head>
<style>
@import url(style.css);
p.highlight {
color: red;
}
svg {
background-color: rgb(41, 41, 36);
}
.bullet{
fill:green
}
.score{
fill:white
}
.gameover{
fill:red;
font-size:30
}
.score{
fill:white
font-size:30
}
</style>
<script src="./dist/spaceinvaders.js"></script>
</head>
<body>
<h1>Space Invaders</h1>
<svg id="canvas" width="600" height="600">
<text id="score" x="40" y="30" class="score" font-size="large" >Score:0</text>
<text id="high_score" x="180" y="30" class="score" font-size="large" >High Score:0</text>
<text id="level" x="350" y="30" class="score" font-size="large" >Level:0</text>
<g id="ship" transform="translate(300,550)">
<polygon points = "-15,20 15,20 0,-20"
style="fill:lightblue">
</polygon>
</g>
</svg>
<h2>Instructions</h2>
<p>
<br> Move Right: Right Arrow Key</br>
<br>Move Left: Left Arrow Key</br>
<br>Shoot: Spacebar</br>
<br>Restart: R</br>
<br>Hit aliens to score points</br>
</p>
</body>
</html>