Adds level prefabs, theme assets, audio, extensions, and deployment scripts for the Unity WebGL migration. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
991 B
HTML
32 lines
991 B
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>主站 Cocos Web</title>
|
||
<style>
|
||
html, body {
|
||
margin: 0; padding: 0; min-height: 100%;
|
||
background: #1a1a2e;
|
||
display: flex; flex-direction: column; align-items: center;
|
||
}
|
||
/* 与 Unity Web 模板一致:桌面固定 960×600 */
|
||
#GameDiv { width: 960px; height: 600px; flex-shrink: 0; }
|
||
#bar { color: #fff; font-family: sans-serif; padding: 8px; width: 960px; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="bar">加载中…</div>
|
||
<div id="GameDiv"></div>
|
||
<!-- 与 Unity Template 一致:先挂 JS 回调,再启动 Cocos -->
|
||
<script src="cocos-bridge.js"></script>
|
||
<script>
|
||
// 主站可覆写钩子接收关卡 ID
|
||
window.__tfrhOnExternalLevelInfo = function (json) {
|
||
const data = JSON.parse(json);
|
||
console.log('关卡就绪 LevelID=', data.LevelID, data);
|
||
};
|
||
</script>
|
||
<!-- 构建后将 Cocos 生成的 index.js 引入此页 -->
|
||
</body>
|
||
</html>
|