anan66 commited on
Commit
a126c1e
·
1 Parent(s): 59ca835

upload matchn game

Browse files
Files changed (2) hide show
  1. matchn/HintText.json +7 -0
  2. matchn/MatchNGame.html +383 -286
matchn/HintText.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ "Don't forget to give a like to the game you think is fun!",
3
+ "Pay attention to the creators you like, and they will remind you of their new works as soon as possible!",
4
+ "Set your favorite music as the background music for your work, so that you can share it with others.",
5
+ "Failed the game? The best solution is to play another round.",
6
+ "Remember to talk more with your little pet!"
7
+ ]
matchn/MatchNGame.html CHANGED
@@ -1,289 +1,386 @@
1
- <!DOCTYPE html>
2
- <html xmlns='http://www.w3.org/1999/xhtml' lang='' xml:lang=''>
3
- <head>
4
- <meta charset='utf-8' />
5
- <meta name='viewport' content='width=device-width, user-scalable=no' />
6
- <title>MatchNGame</title>
7
- <style type='text/css'>
8
-
9
- body {
10
- touch-action: none;
11
- margin: 0;
12
- border: 0 none;
13
- padding: 0;
14
- text-align: center;
15
- background-color: black;
16
- }
17
-
18
- #canvas {
19
- display: block;
20
- margin: 0;
21
- color: white;
22
- }
23
-
24
- #canvas:focus {
25
- outline: none;
26
- }
27
-
28
- .godot {
29
- font-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;
30
- color: #e0e0e0;
31
- background-color: #3b3943;
32
- background-image: linear-gradient(to bottom, #403e48, #35333c);
33
- border: 1px solid #45434e;
34
- box-shadow: 0 0 1px 1px #2f2d35;
35
- }
36
-
37
-
38
- /* Status display
39
- * ============== */
40
-
41
- #status {
42
- position: absolute;
43
- left: 0;
44
- top: 0;
45
- right: 0;
46
- bottom: 0;
47
- display: flex;
48
- justify-content: center;
49
- align-items: center;
50
- /* don't consume click events - make children visible explicitly */
51
- visibility: hidden;
52
- }
53
-
54
- @keyframes breathing {
55
- 0% { opacity: 0.5; }
56
- 50% { opacity: 1; }
57
- 100% { opacity: 0.5; }
58
- }
59
-
60
- #loading-logo {
61
- width: 180px;
62
- position: absolute;
63
- top: 40%;
64
- left: 50%;
65
- transform: translate(-50%, -50%);
66
- animation: breathing 3s infinite ease-in-out;
67
- z-index: 10;
68
- visibility: visible;
69
- }
70
-
71
- #status-progress {
72
- width: 512px; /* 确保和图片大小一致 */
73
- height: 512px; /* 让背景图片完全覆盖 */
74
- background-image: url('loadback.png');
75
- background-size: contain; /* 防止拉伸 */
76
- background-repeat: no-repeat;
77
- background-position: center;
78
- position: absolute;
79
- top: 50%;
80
- left: 50%;
81
- transform: translate(-50%, -50%); /* 居中显示 */
82
- visibility: visible;
83
- }
84
-
85
- @media only screen and (orientation:portrait) {
86
- #status-progress {
87
- width: 61.8%;
88
- }
89
- }
90
-
91
- #status-progress-inner {
92
- width: 100%; /* 初始填充 */
93
- height: 100%;
94
- background-image: url('loadfront.png');
95
- background-size: contain; /* 保持原始比例 */
96
- background-repeat: no-repeat;
97
- background-position: center;
98
- position: absolute;
99
- clip-path: inset(0 100% 0 0); /* 通过裁剪实现进度增长 */
100
- transition: clip-path 0.5s linear;
101
- visibility: visible;
102
- }
103
-
104
- #status-indeterminate {
105
- height: 42px;
106
- visibility: visible;
107
- position: relative;
108
- }
109
-
110
- #status-indeterminate > div {
111
- width: 4.5px;
112
- height: 0;
113
- border-style: solid;
114
- border-width: 9px 3px 0 3px;
115
- border-color: #2b2b2b transparent transparent transparent;
116
- transform-origin: center 21px;
117
- position: absolute;
118
- }
119
-
120
- #status-indeterminate > div:nth-child(1) { transform: rotate( 22.5deg); }
121
- #status-indeterminate > div:nth-child(2) { transform: rotate( 67.5deg); }
122
- #status-indeterminate > div:nth-child(3) { transform: rotate(112.5deg); }
123
- #status-indeterminate > div:nth-child(4) { transform: rotate(157.5deg); }
124
- #status-indeterminate > div:nth-child(5) { transform: rotate(202.5deg); }
125
- #status-indeterminate > div:nth-child(6) { transform: rotate(247.5deg); }
126
- #status-indeterminate > div:nth-child(7) { transform: rotate(292.5deg); }
127
- #status-indeterminate > div:nth-child(8) { transform: rotate(337.5deg); }
128
-
129
- #status-notice {
130
- margin: 0 100px;
131
- line-height: 1.3;
132
- visibility: visible;
133
- padding: 4px 6px;
134
- visibility: visible;
135
- }
136
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  <link id='-gd-engine-icon' rel='icon' type='image/png' href='MatchNGame.icon.png' />
138
  <link rel='apple-touch-icon' href='MatchNGame.apple-touch-icon.png'/>
139
-
140
- <link id='-gd-engine-icon' rel='icon' type='image/png' href='res://PlayGo_Game_CommonLibrary/Common/LoadingScene/res/loading_anim/1.png' />
141
- <link rel='apple-touch-icon' href='MatchNGame.apple-touch-icon.png'/>
142
- <script type="text/javascript" src="./uni.webview.1.5.5.js"></script>
143
- <script type="text/javascript" src="./anan.tool.js"></script>
144
- <script type="text/javascript" src="./gameapp.js"></script>
145
- </head>
146
- <body>
147
- <canvas id='canvas'>
148
- HTML5 canvas appears to be unsupported in the current browser.<br />
149
- Please try updating or use a different browser.
150
- </canvas>
151
- <div id='status'>
152
- <img id="loading-logo" src="Logo.png" alt="Loading Logo"/>
153
- <div id='status-progress' style='display: none;' oncontextmenu='event.preventDefault();'><div id ='status-progress-inner'></div></div>
154
- <div id='status-indeterminate' style='display: none;' oncontextmenu='event.preventDefault();'>
155
- <div></div>
156
- <div></div>
157
- <div></div>
158
- <div></div>
159
- <div></div>
160
- <div></div>
161
- <div></div>
162
- <div></div>
163
- </div>
164
- <div id='status-notice' class='godot' style='display: none;'></div>
165
- </div>
166
-
167
- <script type='text/javascript' src='MatchNGame.js'></script>
168
- <script type='text/javascript'>//<![CDATA[
169
-
170
- const GODOT_CONFIG = {"args":[],"canvasResizePolicy":0,"executable":"MatchNGame","experimentalVK":false,"fileSizes":{"MatchNGame.pck":56207824,"MatchNGame.wasm":25658069},"focusCanvas":true,"gdnativeLibs":[]};
171
- var engine = new Engine(GODOT_CONFIG);
172
-
173
- (function() {
174
- const INDETERMINATE_STATUS_STEP_MS = 100;
175
- var logo = document.getElementById('loading-logo');
176
- var statusProgress = document.getElementById('status-progress');
177
- var statusProgressInner = document.getElementById('status-progress-inner');
178
- var statusIndeterminate = document.getElementById('status-indeterminate');
179
- var statusNotice = document.getElementById('status-notice');
180
-
181
- var initializing = true;
182
- var statusMode = 'hidden';
183
-
184
- var animationCallbacks = [];
185
- function animate(time) {
186
- animationCallbacks.forEach(callback => callback(time));
187
- requestAnimationFrame(animate);
188
- }
189
- requestAnimationFrame(animate);
190
-
191
- function setStatusMode(mode) {
192
-
193
- if (statusMode === mode || !initializing)
194
- return;
195
- [statusProgress, statusIndeterminate, statusNotice].forEach(elem => {
196
- elem.style.display = 'none';
197
- });
198
- animationCallbacks = animationCallbacks.filter(function(value) {
199
- return (value != animateStatusIndeterminate);
200
- });
201
- switch (mode) {
202
- case 'progress':
203
- statusProgress.style.display = 'block';
204
- logo.style.display = 'block';
205
- break;
206
- case 'indeterminate':
207
- statusIndeterminate.style.display = 'block';
208
- logo.style.display = 'block';
209
- animationCallbacks.push(animateStatusIndeterminate);
210
- break;
211
- case 'notice':
212
- statusNotice.style.display = 'block';
213
- logo.style.display = 'block';
214
- break;
215
- case 'hidden':
216
- if (logo) logo.style.display = 'none';
217
- break;
218
- default:
219
- throw new Error('Invalid status mode');
220
- }
221
- statusMode = mode;
222
- }
223
-
224
- function animateStatusIndeterminate(ms) {
225
- var i = Math.floor(ms / INDETERMINATE_STATUS_STEP_MS % 8);
226
- if (statusIndeterminate.children[i].style.borderTopColor == '') {
227
- Array.prototype.slice.call(statusIndeterminate.children).forEach(child => {
228
- child.style.borderTopColor = '';
229
- });
230
- statusIndeterminate.children[i].style.borderTopColor = '#dfdfdf';
231
- }
232
- }
233
-
234
- function setStatusNotice(text) {
235
- while (statusNotice.lastChild) {
236
- statusNotice.removeChild(statusNotice.lastChild);
237
- }
238
- var lines = text.split('\n');
239
- lines.forEach((line) => {
240
- statusNotice.appendChild(document.createTextNode(line));
241
- statusNotice.appendChild(document.createElement('br'));
242
- });
243
- };
244
-
245
- function displayFailureNotice(err) {
246
- var msg = err.message || err;
247
- console.error(msg);
248
- setStatusNotice(msg);
249
- setStatusMode('notice');
250
- initializing = false;
251
- };
252
-
253
- if (!Engine.isWebGLAvailable()) {
254
- displayFailureNotice('WebGL not available');
255
- } else {
256
- // statusProgressInner.style.width = 1 * 100 + '%';
257
- // statusProgressInner.style.clipPath = `inset(0 ${100 - current/total}% 0 0)`;
258
- // setStatusMode('progress');
259
-
260
- setStatusMode('indeterminate');
261
- engine.startGame({
262
- 'onProgress': function (current, total) {
263
- if (total > 0) {
264
- var progress = (current / total) * 100; // 计算进度
265
- statusProgressInner.style.clipPath = `inset(0 ${100 - progress}% 0 0)`;
266
- setStatusMode('progress');
267
- if (current === total) {
268
- // wait for progress bar animation
269
- setTimeout(() => {
270
- setStatusMode('indeterminate');
271
- }, 500);
272
- }
273
- } else {
274
- setStatusMode('indeterminate');
275
- }
276
- },
277
- }).then(() => {
278
- setStatusMode('hidden');
279
- initializing = false;
280
- }, displayFailureNotice);
281
-
282
- }
283
- })();
284
- //]]></script>
285
- </body>
286
- </html>
287
-
288
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
 
 
1
+ <!DOCTYPE html>
2
+ <html xmlns='http://www.w3.org/1999/xhtml' lang='' xml:lang=''>
3
+ <head>
4
+ <meta charset='utf-8' />
5
+ <meta name='viewport' content='width=device-width, user-scalable=no' />
6
+ <title>MatchNGame</title>
7
+ <style type='text/css'>
8
+
9
+ body {
10
+ touch-action: none;
11
+ margin: 0;
12
+ border: 0 none;
13
+ padding: 0;
14
+ text-align: center;
15
+ background-color: black;
16
+ }
17
+
18
+ #progress-container {
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: center;
22
+ justify-content: center;
23
+ height: 100vh; /* 垂直居中整个页面高度 */
24
+ }
25
+
26
+ #custom-loader {
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: center;
35
+ align-items: center;
36
+ }
37
+
38
+ #logo {
39
+ width: 400px;
40
+ max-width: 80vw;
41
+ margin-bottom: 250px;
42
+ }
43
+
44
+ #bottom-text {
45
+ position: absolute;
46
+ bottom: 20px;
47
+ font-size: 14px;
48
+ width: 90%;
49
+ color: white;
50
+ }
51
+
52
+ #canvas {
53
+ display: block;
54
+ margin: 0;
55
+ color: white;
56
+ }
57
+
58
+ #canvas:focus {
59
+ outline: none;
60
+ }
61
+
62
+ .godot {
63
+ font-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;
64
+ color: #e0e0e0;
65
+ background-color: #3b3943;
66
+ background-image: linear-gradient(to bottom, #403e48, #35333c);
67
+ border: 1px solid #45434e;
68
+ box-shadow: 0 0 1px 1px #2f2d35;
69
+ }
70
+
71
+
72
+ /* Status display
73
+ * ============== */
74
+
75
+ #status {
76
+ position: absolute;
77
+ left: 0;
78
+ top: 0;
79
+ right: 0;
80
+ bottom: 0;
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+ /* don't consume click events - make children visible explicitly */
85
+ visibility: hidden;
86
+ }
87
+
88
+ @keyframes breathing {
89
+ 0% { opacity: 0.5; }
90
+ 50% { opacity: 1; }
91
+ 100% { opacity: 0.5; }
92
+ }
93
+
94
+ /* 外层背景(加载图) */
95
+ #status-progress {
96
+ width: 512px;
97
+ height: 512px;
98
+ background-image: url('loadback.png');
99
+ background-size: contain;
100
+ background-repeat: no-repeat;
101
+ background-position: center;
102
+ position: absolute;
103
+ top: 50%;
104
+ left: 50%;
105
+ transform: translate(-50%, -50%);
106
+ visibility: visible;
107
+ }
108
+
109
+ /* 前景进度图 */
110
+ #status-progress-inner {
111
+ width: 100%;
112
+ height: 100%;
113
+ background-image: url('loadfront.png');
114
+ background-size: contain;
115
+ background-repeat: no-repeat;
116
+ background-position: center;
117
+ position: absolute;
118
+ top: 0;
119
+ left: 0;
120
+ clip-path: inset(0 100% 0 0); /* 动态控制这里 */
121
+ <!-- transition: clip-path 0.3s ease-out; -->
122
+ visibility: visible;
123
+ pointer-events: none;
124
+ }
125
+
126
+ /* 百分比文字 */
127
+ #progress-percent {
128
+ position: absolute;
129
+ top: 55%; /* ✅ 在进度条底下 */
130
+ left: 50%;
131
+ transform: translate(-50%, 10px); /* ✅ 微调垂直距离 */
132
+ color: orange;
133
+ font-weight: bold;
134
+ font-size: 20px;
135
+ text-shadow: 1px 1px 2px #000;
136
+ z-index: 2;
137
+ pointer-events: none;
138
+ }
139
+
140
+ #status-indeterminate {
141
+ height: 42px;
142
+ visibility: visible;
143
+ position: relative;
144
+ }
145
+
146
+ #status-indeterminate > div {
147
+ width: 4.5px;
148
+ height: 0;
149
+ border-style: solid;
150
+ border-width: 9px 3px 0 3px;
151
+ border-color: #2b2b2b transparent transparent transparent;
152
+ transform-origin: center 21px;
153
+ position: absolute;
154
+ }
155
+
156
+ #status-indeterminate > div:nth-child(1) { transform: rotate( 22.5deg); }
157
+ #status-indeterminate > div:nth-child(2) { transform: rotate( 67.5deg); }
158
+ #status-indeterminate > div:nth-child(3) { transform: rotate(112.5deg); }
159
+ #status-indeterminate > div:nth-child(4) { transform: rotate(157.5deg); }
160
+ #status-indeterminate > div:nth-child(5) { transform: rotate(202.5deg); }
161
+ #status-indeterminate > div:nth-child(6) { transform: rotate(247.5deg); }
162
+ #status-indeterminate > div:nth-child(7) { transform: rotate(292.5deg); }
163
+ #status-indeterminate > div:nth-child(8) { transform: rotate(337.5deg); }
164
+
165
+ #status-notice {
166
+ margin: 0 100px;
167
+ line-height: 1.3;
168
+ visibility: visible;
169
+ padding: 4px 6px;
170
+ visibility: visible;
171
+ }
172
+
173
+ /* 手机适配 */
174
+ @media only screen and (orientation: portrait) {
175
+ #status-progress {
176
+ width: 61.8vw;
177
+ height: 61.8vw;
178
+ }
179
+ #logo {
180
+ width: 200px;
181
+ margin-bottom: 150px;
182
+ }
183
+ }
184
+
185
+ </style>
186
  <link id='-gd-engine-icon' rel='icon' type='image/png' href='MatchNGame.icon.png' />
187
  <link rel='apple-touch-icon' href='MatchNGame.apple-touch-icon.png'/>
188
+
189
+ <link rel='apple-touch-icon' href='MatchNGame.apple-touch-icon.png'/>
190
+ <script type="text/javascript" src="./uni.webview.1.5.5.js"></script>
191
+ <script type="text/javascript" src="./anan.tool.js"></script>
192
+ <script type="text/javascript" src="./gameapp.js"></script>
193
+ </head>
194
+ <body>
195
+ <canvas id='canvas'>
196
+ HTML5 canvas appears to be unsupported in the current browser.<br />
197
+ Please try updating or use a different browser.
198
+ </canvas>
199
+ <div id="custom-loader">
200
+ <div id="progress-container">
201
+ <img id="logo" src="Logo.png" alt="Loading Logo"/>
202
+ <div id='status-progress'>
203
+ <div id ='status-progress-inner'></div>
204
+ </div>
205
+ <div id="progress-percent">0%</div>
206
+ </div>
207
+ <div id="bottom-text">Set your favorite music as the background music for your work,<br>so that you can share it with others.</div>
208
+ </div>
209
+ <div id='status'>
210
+ <div id='status-indeterminate' style='display: none;' oncontextmenu='event.preventDefault();'>
211
+ <div></div>
212
+ <div></div>
213
+ <div></div>
214
+ <div></div>
215
+ <div></div>
216
+ <div></div>
217
+ <div></div>
218
+ <div></div>
219
+ </div>
220
+ <div id='status-notice' class='godot' style='display: none;'></div>
221
+ </div>
222
+
223
+ <!-- // 文字轮播效果 -->
224
+ <script type='text/javascript'>
225
+ const textElement = document.getElementById("bottom-text");
226
+ let currentIndex = 0;
227
+ let textList = [];
228
+
229
+ // 从文件读取内容
230
+ fetch("./HintText.json")
231
+ .then(response => response.json())
232
+ .then(data => {
233
+ textList = data;
234
+ if (textList.length > 0) {
235
+ updateText(); // 初始显示
236
+ setInterval(updateText, 5000); // 每 5 秒切换一次
237
+ }
238
+ })
239
+ .catch(error => {
240
+ console.error("加载消息列表失败:", error);
241
+ });
242
+ function updateText() {
243
+ textElement.innerText = textList[currentIndex];
244
+ currentIndex = (currentIndex + 1) % textList.length;
245
+ }
246
+ </script>
247
+
248
+ <script type='text/javascript' src='MatchNGame.js'></script>
249
+ <script type='text/javascript'>//<![CDATA[
250
+ const GODOT_CONFIG = {"args":[],"canvasResizePolicy":0,"executable":"MatchNGame","experimentalVK":false,"fileSizes":{"MatchNGame.pck":56207824,"MatchNGame.wasm":25658069},"focusCanvas":true,"gdnativeLibs":[]};
251
+ var engine = new Engine(GODOT_CONFIG);
252
+
253
+ (function() {
254
+ const INDETERMINATE_STATUS_STEP_MS = 100;
255
+ var logo = document.getElementById('logo');
256
+ var statusProgress = document.getElementById('status-progress');
257
+ var statusProgressInner = document.getElementById('status-progress-inner');
258
+ var statusIndeterminate = document.getElementById('status-indeterminate');
259
+ var statusNotice = document.getElementById('status-notice');
260
+
261
+ var initializing = true;
262
+ var statusMode = 'hidden';
263
+
264
+ var animationCallbacks = [];
265
+
266
+ const textElement = document.getElementById("bottom-text");
267
+ let currentIndex = 0;
268
+ let textList = [];
269
+
270
+ //定义给 Godot 调用的函数
271
+ window.godotFinishedLoading = function () {
272
+ console.log('Godot 内部加载完成!');
273
+ document.getElementById('status-progress-inner').style.clipPath = `inset(0 0% 0 0)`; // 100%
274
+ setTimeout(() => {
275
+ <!-- setStatusMode('hidden'); -->
276
+ document.getElementById("custom-loader").style.display = "none";
277
+ setStatusMode('hidden');
278
+ initializing = false;
279
+ }, 500); // 延迟一点
280
+ };
281
+
282
+ function animate(time) {
283
+ animationCallbacks.forEach(callback => callback(time));
284
+ requestAnimationFrame(animate);
285
+ }
286
+ requestAnimationFrame(animate);
287
+
288
+ function setStatusMode(mode) {
289
+
290
+ if (statusMode === mode || !initializing)
291
+ return;
292
+ [statusProgress, statusIndeterminate, statusNotice].forEach(elem => {
293
+ elem.style.display = 'none';
294
+ });
295
+ animationCallbacks = animationCallbacks.filter(function(value) {
296
+ return (value != animateStatusIndeterminate);
297
+ });
298
+ switch (mode) {
299
+ case 'progress':
300
+ statusProgress.style.display = 'block';
301
+ logo.style.display = 'block';
302
+ break;
303
+ case 'indeterminate':
304
+ statusIndeterminate.style.display = 'block';
305
+ logo.style.display = 'block';
306
+ animationCallbacks.push(animateStatusIndeterminate);
307
+ break;
308
+ case 'notice':
309
+ statusNotice.style.display = 'block';
310
+ logo.style.display = 'block';
311
+ break;
312
+ case 'hidden':
313
+ if (logo) logo.style.display = 'none';
314
+ break;
315
+ default:
316
+ throw new Error('Invalid status mode');
317
+ }
318
+ statusMode = mode;
319
+ }
320
+
321
+ function animateStatusIndeterminate(ms) {
322
+ var i = Math.floor(ms / INDETERMINATE_STATUS_STEP_MS % 8);
323
+ if (statusIndeterminate.children[i].style.borderTopColor == '') {
324
+ Array.prototype.slice.call(statusIndeterminate.children).forEach(child => {
325
+ child.style.borderTopColor = '';
326
+ });
327
+ statusIndeterminate.children[i].style.borderTopColor = '#dfdfdf';
328
+ }
329
+ }
330
+
331
+ function setStatusNotice(text) {
332
+ while (statusNotice.lastChild) {
333
+ statusNotice.removeChild(statusNotice.lastChild);
334
+ }
335
+ var lines = text.split('\n');
336
+ lines.forEach((line) => {
337
+ statusNotice.appendChild(document.createTextNode(line));
338
+ statusNotice.appendChild(document.createElement('br'));
339
+ });
340
+ };
341
+
342
+ function displayFailureNotice(err) {
343
+ var msg = err.message || err;
344
+ console.error(msg);
345
+ setStatusNotice(msg);
346
+ setStatusMode('notice');
347
+ initializing = false;
348
+ };
349
+
350
+ if (!Engine.isWebGLAvailable()) {
351
+ displayFailureNotice('WebGL not available');
352
+ } else {
353
+ setStatusMode('indeterminate');
354
+ engine.startGame({
355
+ 'onProgress': function (current, total) {
356
+ if (total > 0) {
357
+ let progress = Math.min((current / total) * 100, 90); //进度条卡在90 等待游戏内加载
358
+ progress = Math.floor(progress);
359
+ document.getElementById("progress-percent").innerText = `${progress}%`;
360
+ statusProgressInner.style.clipPath = `inset(0 ${100 - progress}% 0 0)`;
361
+ setStatusMode('progress');
362
+ if (current === total) {
363
+ // wait for progress bar animation
364
+ setTimeout(() => {
365
+ setStatusMode('indeterminate');
366
+ }, 500);
367
+ }
368
+ } else {
369
+ setStatusMode('indeterminate');
370
+ }
371
+ },
372
+ }).then(() => {
373
+ // 不隐藏, 等待游戏通知
374
+ console.log('Godot 引擎已启动, 等待游戏内资源加载完成...');
375
+ //setStatusMode('hidden');
376
+ //initializing = false;
377
+ }, displayFailureNotice);
378
+
379
+ }
380
+ })();
381
+ //]]></script>
382
+ </body>
383
+ </html>
384
+
385
+
386