-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (69 loc) · 2.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Grenade Brothers WebGL Player</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/Desktop.json", { onProgress: UnityProgress });
</script>
<script>
function ToggleDiv() {
var div = document.getElementById("controls");
if (div.style.display === "none") {
div.style.display = "block";
} else {
div.style.display = "none";
}
}
</script>
</head>
<body>
<div class="webgl-content">
<div id="unityContainer" style="width: 960px; height: 600px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="unityInstance.SetFullscreen(1)"></div>
<div class="title">Grenade Brothers</div>
</div>
<br>
<button style="background-color: aqua;
border: 2px solid black;
padding: 0.5rem;" onclick="ToggleDiv()">Toggle Controls</button>
<p style="float: right;">
Attributions:
<a href="https://opengameart.org/content/3-ping-pong-sounds-8-bit-style" target="_blank">Sound Effects</a>
<a href="https://opengameart.org/content/8bit-title-screen" target="_blank">Main Menu Music</a>
</p>
</div>
<div id="controls" style="padding-right: 0.5rem;
opacity: 0.75;
background-color: aliceblue;
position: relative;
float: right;
font-size: 0.75rem;
">
<p>
<ul><b>General Controls</b>
<li>Esc - Pause</li>
</ul>
<br>
<ul style="color: maroon;"><b>Player 1</b>
<li>A - Left</li>
<li>D - Right</li>
<li>W - Jump</li>
</ul>
<br>
<ul style="color:royalblue;"><b>Player 2</b>
<li>LeftArrow - Left</li>
<li>RightArrow - Right</li>
<li>UpArrow - Jump</li>
</ul>
</p>
</div>
</body>
</html>