-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
249 lines (241 loc) · 8.37 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Survival Game</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
</head>
<style>
body {
font-family: arial;
color:#fff;
font-size:14px;
}
#unity-build-title {
width:100%;
}
h2 {
font-size: 16px;
}
h3 {
font-size:14px;
}
.weapons {
display:grid;
grid-column-gap:40px;
column-gap: 40px;
text-align: center;
grid-template-columns: repeat(5, 1fr);
}
#unity-build-title {
float:none;
position: relative;
}
.weapons-wrapper {
margin-top:40px;
}
#unity-container.unity-desktop {
left: 50%;
top:auto;
transform: translate(-50%, 0);
padding: 80px 0;
}
.weapons-wrapper img {
height:50px;
}
.weapons-wrapper p {
margin:.5em 0;
}
.treasure {
text-align: center;
}
</style>
<body>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" width=1280 height=720></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-warning"> </div>
<div id="unity-footer">
<!--<div id="unity-webgl-logo"></div>-->
<div id="unity-fullscreen-button"></div>
<!--<<div id="unity-build-title">Oasis Game</div>-->
<div id="unity-build-title">Super Chad Adventures</div>
<div class="weapons-wrapper treasure">
<h2>TREASURE CHEST</h2>
<div class="weapon">
<h3>OPEN UP THE CHEST TO EARN MORE PTS</h3>
<img src="./img/chest.png">
<p>Earn up to DOUBLE of your current points</p>
<p>Chest appears every 20 seconds, gets destroyed 10 seconds</p>
</div>
</div>
<div class="weapons-wrapper">
<h2>WEAPONS</h2>
<div class="weapons">
<div class="weapon">
<h3>0 POINTS</h3>
<img src="./img/basic.png"><br><b>Basic Weapon</b>
<!--<p>Fire Rate: 1</p>-->
<p>Damage: 5</p>
</div>
<div class="weapon">
<h3>40 POINTS</h3>
<img src="./img/07.png"><br><b>Faster Weapon</b>
<p>Fire Rate: 2</p>
<p>Damage: 10</p>
</div>
<div class="weapon">
<h3>400 POINTS</h3>
<img src="./img/stronger.png"><br><b>Stronger Weapon</b>
<p>Fire Rate: 2</p>
<p>Damage: 20</p>
</div>
<div class="weapon">
<h3>850 POINTS</h3>
<img src="./img/wave.png"><br><b>Wave Weapon</b>
<!--<p>Fire Rate: 0.5</p>-->
<p>Damage: 30</p>
</div>
<div class="weapon">
<h3>3000 POINTS</h3>
<img src="./img/Fire.png"><br><b>Grenade</b>
<!--<p>Fire Rate: 1</p>-->
<p>Damage: 70</p>
</div>
</div>
</div>
<div class="weapons-wrapper">
<h2>ENEMIES & REWARDS</h2>
<div class="weapons">
<div class="weapon">
<h3>ZOMBIE</h3>
<img src="./img/Zombie.png">
<p>Health: 25</p>
<p>Pts Reward: 5</p>
</div>
<div class="weapon">
<h3>GOBLIN</h3>
<img src="./img/Goblin.png">
<p>Health: 30</p>
<p>Pts Reward: 20</p>
</div>
<div class="weapon">
<h3>GHOUL</h3>
<img src="./img/Ghoul.png">
<p>Health: 70</p>
<p>Pts Reward: 50</p>
</div>
</div>
</div>
<div class="weapons-wrapper">
<h2>WEAPON PICKUP</h2>
<div class="weapons">
<div class="weapon">
<img src="./img/Small_blue.png">
<p>Basic Weapon</p>
</div>
<div class="weapon">
<img src="./img/Big_flask.png">
<p>Faster Weapon</p>
</div>
<div class="weapon">
<img src="./img/Big_red.png">
<p>Stronger Weapon</p>
</div>
<div class="weapon">
<img src="./img/water.png">
<p>Wave Weapon</p>
</div>
<div class="weapon">
<img src="./img/Fire.png">
<p>Grenade</p>
</div>
</div>
</div>
</div>
</div>
<script src="web3/index.js"></script>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
var progressBarFull = document.querySelector("#unity-progress-bar-full");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
var warningBanner = document.querySelector("#unity-warning");
// Shows a temporary message banner/ribbon for a few seconds, or
// a permanent error message on top of the canvas if type=='error'.
// If type=='warning', a yellow highlight color is used.
// Modify or remove this function to customize the visually presented
// way that non-critical warnings and error messages are presented to the
// user.
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
}
var div = document.createElement('div');
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == 'error') div.style = 'background: red; padding: 10px;';
else {
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
setTimeout(function() {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/game.loader.js";
var config = {
dataUrl: buildUrl + "/game.data",
frameworkUrl: buildUrl + "/game.framework.js",
codeUrl: buildUrl + "/game.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "Oasis Game",
productVersion: "1.0",
showBanner: unityShowBanner,
};
// By default Unity keeps WebGL canvas render target size matched with
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
// Set this to false if you want to decouple this synchronization from
// happening inside the engine, and you would instead like to size up
// the canvas DOM size and WebGL render target sizes yourself.
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
container.className = "unity-mobile";
// Avoid draining fillrate performance on mobile devices,
// and default/override low DPI mode on mobile browsers.
config.devicePixelRatio = 1;
unityShowBanner('WebGL builds are not supported on mobile devices.');
} else {
canvas.style.width = "1280px";
canvas.style.height = "720px";
}
loadingBar.style.display = "block";
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</body>
</html>