Skip to content

Commit 8baf8f8

Browse files
authored
Merge pull request #3 from ITC-error505/Games-Css
Games css
2 parents 7e8093d + b99ce6d commit 8baf8f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+604
-4
lines changed

Games.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
</div>
6363
<!-- Games -->
6464
<div class = "buttons">
65-
<a href="Game1" data-gameid="2">Pizza Warrior</a>
66-
<a href="Game2" data-gameid="3">Pizza Popper</a>
67-
<a href="Game3" data-gameid="1">Pizza Man</a>
65+
<a href="Pizza-Warrior/PizzaWarrior.html" data-gameid="2">Pizza Warrior</a>
66+
<a href="PizzaPopper/PizzaPopper.html" data-gameid="3">Pizza Popper</a>
67+
<a href="Pizzaman/PizzaMan.html" data-gameid="1">Pizza Man</a>
6868
</div>
6969

7070
<!-- Scores -->

Pizza-Warrior/Build/Builds.data

14.5 MB
Binary file not shown.

Pizza-Warrior/Build/Builds.framework.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pizza-Warrior/Build/Builds.loader.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Pizza-Warrior/Build/Builds.wasm

40.8 MB
Binary file not shown.

Pizza-Warrior/PizzaWarrior.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
body {
2+
text-align: center;
3+
padding: 0;
4+
border: 0;
5+
margin: 0;
6+
background: url(../assets/pizzaBackground.png);
7+
background-size: 100%;
8+
background-color: #281A34;
9+
display: grid;
10+
align-items: center;
11+
justify-content:center;
12+
13+
/*All Texts' Font*/
14+
font-family: "Pixelify Sans", sans-serif;
15+
font-style: normal;
16+
font-weight: 400px;
17+
text-align: center;
18+
19+
}
20+
21+
.rotation {
22+
display: none;
23+
}
24+
25+
/**If the device is a touch screen and in landscape*/
26+
@media only screen and (orientation: portrait){
27+
#unity-container {
28+
display: none;
29+
}
30+
31+
.rotation {
32+
display:block;
33+
text-wrap: wrap;
34+
width: 70%;
35+
justify-self: center;
36+
border: 5px solid #FF3B7F;
37+
border-radius: 30px;
38+
background-color: #281A34;
39+
padding: 20px;
40+
}
41+
42+
body {
43+
color: #3BF8FF;
44+
font-size: 1.8rem;
45+
width: 100vw;
46+
height: 100vh;
47+
}
48+
49+
}

Pizza-Warrior/PizzaWarrior.html

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
8+
<!--Google material symbols-->
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined"
11+
rel="stylesheet"
12+
/>
13+
14+
<!--Pixel Font-->
15+
<link rel="preconnect" href="https://fonts.googleapis.com">
16+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17+
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:[email protected]&display=swap" rel="stylesheet">
18+
19+
<title>Chuck N' Cheese</title>
20+
<link rel="shortcut icon" href="../assets/favicon.ico">
21+
<link rel="stylesheet" href="TemplateData/style.css">
22+
<link rel="stylesheet" href="PizzaWarrior.css">
23+
<script src="Authorization.js"></script>
24+
</head>
25+
<body>
26+
27+
<div class = rotation>Please Rotate Or Resize The Screen Into Landscape Mode. <br>
28+
<span class="material-symbols-outlined" style= "font-size: 3rem;">
29+
sync
30+
</span>
31+
</div>
32+
33+
<div id="unity-container" class="unity-desktop">
34+
<canvas id="unity-canvas"></canvas>
35+
<div id="unity-loading-bar">
36+
<div id="unity-logo"></div>
37+
<div id="unity-progress-bar-empty">
38+
<div id="unity-progress-bar-full"></div>
39+
</div>
40+
</div>
41+
<div id="unity-warning"> </div>
42+
<div id="unity-footer">
43+
</div>
44+
</div>
45+
<script>
46+
var canvas = document.querySelector("#unity-canvas");
47+
48+
// Shows a temporary message banner/ribbon for a few seconds, or
49+
// a permanent error message on top of the canvas if type=='error'.
50+
// If type=='warning', a yellow highlight color is used.
51+
// Modify or remove this function to customize the visually presented
52+
// way that non-critical warnings and error messages are presented to the
53+
// user.
54+
function unityShowBanner(msg, type) {
55+
var warningBanner = document.querySelector("#unity-warning");
56+
function updateBannerVisibility() {
57+
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
58+
}
59+
var div = document.createElement('div');
60+
div.innerHTML = msg;
61+
warningBanner.appendChild(div);
62+
if (type == 'error') div.style = 'background: red; padding: 10px;';
63+
else {
64+
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
65+
setTimeout(function() {
66+
warningBanner.removeChild(div);
67+
updateBannerVisibility();
68+
}, 5000);
69+
}
70+
updateBannerVisibility();
71+
}
72+
73+
var buildUrl = "Build";
74+
var loaderUrl = buildUrl + "/Builds.loader.js";
75+
var config = {
76+
arguments: [],
77+
dataUrl: buildUrl + "/Builds.data",
78+
frameworkUrl: buildUrl + "/Builds.framework.js",
79+
codeUrl: buildUrl + "/Builds.wasm",
80+
streamingAssetsUrl: "StreamingAssets",
81+
companyName: "DefaultCompany",
82+
productName: "Pizza Warrior",
83+
productVersion: "0.1",
84+
//showBanner: unityShowBanner,
85+
};
86+
87+
// By default, Unity keeps WebGL canvas render target size matched with
88+
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
89+
// Set this to false if you want to decouple this synchronization from
90+
// happening inside the engine, and you would instead like to size up
91+
// the canvas DOM size and WebGL render target sizes yourself.
92+
// config.matchWebGLToCanvasSize = false;
93+
94+
// If you would like all file writes inside Unity Application.persistentDataPath
95+
// directory to automatically persist so that the contents are remembered when
96+
// the user revisits the site the next time, uncomment the following line:
97+
// config.autoSyncPersistentDataPath = true;
98+
// This autosyncing is currently not the default behavior to avoid regressing
99+
// existing user projects that might rely on the earlier manual
100+
// JS_FileSystem_Sync() behavior, but in future Unity version, this will be
101+
// expected to change.
102+
103+
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
104+
// Mobile device style: fill the whole browser client area with the game canvas:
105+
106+
var meta = document.createElement('meta');
107+
meta.name = 'viewport';
108+
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
109+
document.getElementsByTagName('head')[0].appendChild(meta);
110+
document.querySelector("#unity-container").className = "unity-mobile";
111+
canvas.className = "unity-mobile";
112+
113+
// To lower canvas resolution on mobile devices to gain some
114+
// performance, uncomment the following line:
115+
// config.devicePixelRatio = 1;
116+
117+
118+
} else {
119+
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
120+
canvas.style.width = "100vw";
121+
canvas.style.height = "100vh";
122+
}
123+
124+
//document.querySelector("#unity-loading-bar").style.display = "block";
125+
126+
var script = document.createElement("script");
127+
script.src = loaderUrl;
128+
script.onload = () => {
129+
createUnityInstance(canvas, config, (progress) => {
130+
//document.querySelector("#unity-progress-bar-full").style.width = 100 * progress + "%";
131+
}).then((unityInstance) => {
132+
document.querySelector("#unity-loading-bar").style.display = "none";
133+
// document.querySelector("#unity-fullscreen-button").onclick = () => {
134+
// unityInstance.SetFullscreen(1);
135+
// };
136+
137+
}).catch((message) => {
138+
alert(message);
139+
});
140+
};
141+
142+
document.body.appendChild(script);
143+
144+
</script>
145+
</body>
146+
</html>
665 Bytes
Loading
2.25 KB
Binary file not shown.
175 Bytes
Loading

0 commit comments

Comments
 (0)