forked from chriscourses/pokemon-style-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
183 lines (174 loc) · 4.16 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<style>
* {
font-family: 'Press Start 2P', cursive;
}
body {
background-color: black;
}
h1 {
margin: 0;
}
button {
border: 0;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #ddd;
}
</style>
</head>
<div style="display: inline-block; position: relative">
<div
id="overlappingDiv"
style="
background-color: black;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
pointer-events: none;
z-index: 10;
"
></div>
<canvas></canvas>
<div id="userInterface" style="display: none">
<!-- Represents health bar of draggle (enemy) -->
<div
style="
background-color: white;
width: 250px;
position: absolute;
top: 50px;
left: 50px;
border: 4px black solid;
padding: 12px;
"
>
<h1 style="font-size: 16px">Draggle</h1>
<div style="position: relative">
<div
style="height: 5px; background-color: #ccc; margin-top: 10px"
></div>
<div
id="enemyHealthBar"
style="
height: 5px;
background-color: green;
position: absolute;
top: 0;
left: 0;
right: 0;
"
></div>
</div>
</div>
<!-- Represents health bar of emby (us) -->
<div
style="
background-color: white;
width: 250px;
position: absolute;
top: 330px;
right: 50px;
border: 4px black solid;
padding: 12px;
"
>
<h1 style="font-size: 16px">Emby</h1>
<div style="position: relative">
<div
style="height: 5px; background-color: #ccc; margin-top: 10px"
></div>
<div
id="playerHealthBar"
style="
height: 5px;
background-color: green;
position: absolute;
top: 0;
left: 0;
right: 0;
"
></div>
</div>
</div>
<div
style="
background-color: white;
height: 140px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-top: 4px black solid;
display: flex;
"
>
<div
id="dialogueBox"
style="
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: white;
padding: 12px;
display: none;
cursor: pointer;
"
>
sdkfjlsdajl
</div>
<div
id="attacksBox"
style="
width: 66.66%;
display: grid;
grid-template-columns: repeat(2, 1fr);
"
></div>
<div
style="
display: flex;
align-items: center;
justify-content: center;
width: 33.33%;
border-left: 4px black solid;
"
>
<h1 id="attackType" style="font-size: 16px">Attack Type</h1>
</div>
</div>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.min.js"
integrity="sha512-6+YN/9o9BWrk6wSfGxQGpt3EUK6XeHi6yeHV+TYD2GR0Sj/cggRpXr1BrAQf0as6XslxomMUxXp2vIl+fv0QRA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"
integrity="sha512-H6cPm97FAsgIKmlBA4s774vqoN24V5gSQL4yBTDOY2su2DeXZVhQPxFK4P6GPdnZqM9fg1G3cMv5wD7e6cFLZQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="data/audio.js"></script>
<script src="data/battleZones.js"></script>
<script src="data/collisions.js"></script>
<script src="data/attacks.js"></script>
<script src="data/monsters.js"></script>
<script src="classes.js"></script>
<script src="index.js"></script>
<script src="battleScene.js"></script>