-
Notifications
You must be signed in to change notification settings - Fork 0
/
outro.html
339 lines (322 loc) · 14.4 KB
/
outro.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html>
<html>
<head>
<title>Portal: It's MyGO!!!!!</title>
<meta charset="utf-8">
<link rel="Shortcut Icon" href="./assets/ico/RanaLogo.png" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scale=no">
<link rel="stylesheet" type="text/css" href="./assets/style/base.css">
<link rel="stylesheet" type="text/css" href="./assets/style/outro.css">
<link rel="stylesheet" type="text/css" href="./assets/style/dialog.css">
<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=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+SC:[email protected]&family=Noto+Serif+SC:[email protected]&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet">
</head>
<body>
<div class="scroll-container">
<div class="para">
<div class="middle h1">你达成了:<span id="endingType"></span>结局</div>
<div><br></div>
<div><br></div>
<div class="middle">本次游戏中</div>
<div><br></div>
<div>
<span style="color: #77DD77">要乐奈</span>吃到了 <span id="parfait"></span> 份<span
style="color: #77DD77;">抹茶芭菲</span>,这让猫猫很开心;
</div>
<div><span style="color: #77DD77">要乐奈</span>摧毁了 <span id="camera"></span> 个<span
style="color: red">摄像头</span>,但是本次游戏中没有任何<span style="color: red">摄像头</span>受到伤害。</div>
<div>
<span style="color: #77DD77">要乐奈</span>一共重新开始了 <span id="restart"></span> 次,幸好这只是虚拟实验;
否则就算猫猫真的是猫咪,九条命也不够用。
</div>
<div><br></div>
<div>你一共跳跃了 <span id="jump"></span> 次,</div>
<div>在空中停留了 <span id="jumpTime"></span> 秒。</div>
<div><br></div>
<div>
<span style="color: #40bce2">GLaDOS</span> 消耗了 <span id="bullet"></span> 枚子弹来试图射杀你。但消耗并不重要,因为<span
style="color: #ff9500">光圈科技</span>
自动化武器生产系统将会在 <span id="bulletTime"></span> 秒内生产出消耗的那部分子弹;在这之后,
一切都会恢复原样,而你对<span style="color: #ff9500">光圈科技</span>也没有产生任何别的影响了
</div>
<div><br></div>
<div class="middle h1">THAT'S ALL. </div>
<div><br></div>
<div class="middle">对了,顺带一提,The <span style="color: #77DD77">PARFAIT</span> is a <span
style="color: red">LIE</span>. </div>
<div><br></div>
<div><br></div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/LogoNew.png" style="height: 300px;width: auto;">
</div>
</div>
</div>
<div class="middle h1">Produced By</div>
<div class="middle h1">光圈科技爱猫TV</div>
<div class="middle h1">Aperture Cat Lover Television</div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/logo2.png" style="height: 200px;width: auto;">
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="middle h1" style="color: #77DD77">STAFF</div>
<div><br></div>
<div><br></div>
<div class="card">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/1.png">
<div>
<div class="h1">组长/主程</div>
</div>
</div>
</div>
</div>
<div class="card right">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/2.jpg">
<div>
<div class="h1">主程/技术总监</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/3.jpg">
<div>
<div class="h1">程序/美工</div>
</div>
</div>
</div>
</div>
<div class="card right">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/4.jpg">
<div>
<div class="h1">程序/测试</div>
</div>
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="middle h1">特别鸣谢</div>
<div><br></div>
<div><br></div>
<div class="card">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/Rana1.png">
<div>
<div class="h1" style="color: #77DD77;">要乐奈</div>
<div>领衔主演</div>
</div>
</div>
</div>
</div>
<div class="card right">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/GLaDOS.png">
<div>
<div class="h1" style="color: #ff9500">GLaDOS</div>
<div>你的导师和指引者</div>
</div>
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="card">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/Soyo.png">
<div>
<div class="h1" style="color: #FFDD88;">长崎素世</div>
<div>不能忘记的人</div>
</div>
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/Rana.png">
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/Demo.jpg" style="height: 300px; width: auto;">
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/Bug.png" style="height: 300px; width: auto;">
</div>
</div>
</div>
<div><br></div>
<div><br></div>
<div class="card middle">
<div class="card-container">
<div class="cards-inner">
<img src="./assets/imgs/Tidbits/MyGO.jpg">
</div>
</div>
</div>
</div>
</div>
<div id="exit" style="opacity: 0">
<div class="middle">
<div>单击退出游戏</div>
</div>
</div>
<div id="game">
<div id="game-container">
<div class="splash hidden"></div>
</div>
<div class="dialogue-container">
<div class="dialogue-box">
<img src="./assets/dialog.svg" />
</div>
</div>
</div>
<div class="achievement hidden">
<div class="icon"></div>
<div class="caption">成就已达成</div>
<div class="title"></div>
<div class="desc"></div>
</div>
<div id="resource" style="display: none;"></div>
<script src="./script/utils/Store.js"></script>
<script src="./script/utils/Splash.js"></script>
<script src="./script/utils/Scroll.js"></script>
<script src="./script/utils/Auth.js"></script>
<script src="./script/utils/Keyboard.js"></script>
<script src="./script/utils/Hitbox.js"></script>
<script src="./script/utils/Vector.js"></script>
<script src="./script/utils/Mouse.js"></script>
<script src="./script/Managers/DataManager.js"></script>
<script src="./script/Managers/DialogManager.js"></script>
<script src="./script/Managers/EventManager.js"></script>
<script src="./script/Managers/SoundManager.js"></script>
<script src="./script/Managers/AchievementManager.js"></script>
<script src="./script/Managers/InputManager.js"></script>
<script>
const wait = (ms) => new Promise(resolve => setTimeout(resolve, ms));
window.onload = async () => {
window.$store = new Store();
window.$game = {
isPaused: true,
chapterNow: "Outro",
splash: new Splash(),
dataManager: new DataManager(),
dialogManager: new DialogManager(),
eventManager: new EventManager(),
mouse: {
left: false,
right: false
},
scroll: new Scroll(document.querySelector('.scroll-container')),
view: {
player: {
blockMove: false,
isOnGround: () => true
},
gelledEdgeList: [],
},
fadeOut: () => { },
fadeIn: () => { },
ending: Store.get("ending") == "good" ? Store.get("haruhikage") ? 2 : 1 : 0
};
const stages = await window.$game.dataManager.loadJSON("./assets/stages/events/Outro.json");
// const achievements = await window.$game.dataManager.loadJSON("./assets/stages/achievements.json");
// console.log(achievements);
// console.log(window.$game.achievementManager);
// console.log(Store.get("achievements"));
// console.log(localStorage.getItem("portal-2d-achievements"));
window.$game.achievementManager = new AchievementManager();
await window.$game.achievementManager.load();
// console.log("?");
window.$game.soundManager = new SoundManager();
await window.$game.soundManager.load();
window.$game.isPaused = false;
window.$game.eventManager.add(stages[ window.$game.ending ].events);
// await new Promise((resolve, reject) => {
// document.addEventListener("mousedown", () => {
// resolve();
// }, {
// once: true,
// });
// });
window.$game.inputManager = new InputManager(
new KeyboardManager(),
window.$game.mouse
),
document.addEventListener('mousedown', (e) => {
if (e.button === 0) {
window.$game.mouse.left = true;
} else if (e.button === 2) {
window.$game.mouse.right = true;
}
});
document.addEventListener('mouseup', (e) => {
if (e.button === 0) {
window.$game.mouse.left = false;
} else if (e.button === 2) {
window.$game.mouse.right = false;
}
});
window.$game.achievementManager.update();
while (window.$game.eventManager.head) {
await window.$game.eventManager.handle();
}
const generateText = () => {
const statistics = JSON.parse(Store.get("statistics") || "{}");
document.querySelector("#endingType").innerText = window.$game.ending == 0 ? "孤坏牢" : window.$game.ending == 1 ? "无路矢" : "剪切线";
document.querySelector('#endingType').style.color = window.$game.ending == 0 ? "red" : window.$game.ending == 1 ? "#3388BB" : "#77DD77";
document.querySelector("#parfait").innerText = JSON.parse(Store.get("parfait"))?.length ?? 0;
document.querySelector("#camera").innerText = JSON.parse(Store.get("camera"))?.length ?? 0;
document.querySelector("#jump").innerText = statistics?.jump ?? 0;
document.querySelector("#jumpTime").innerText = (statistics?.jumpTime / 1000).toFixed(2) ?? 0;
document.querySelector("#restart").innerText = statistics?.restart ?? 0;
document.querySelector("#bullet").innerText = statistics?.bullet ?? 0;
document.querySelector("#bulletTime").innerText = (statistics?.bullet / 30).toFixed(2) ?? 0;
};
generateText();
await wait(500);
window.$game.scroll.start().then(() => {
document.querySelector("#exit").classList.add("fadeLoop");
document.addEventListener('click', () => {
window.location.href = `./index.html?${window.$store.encode()}`;
});
});
}
</script>
</body>
</html>