Complete Cocos Creator port with level bundles, themes, and tooling.

Adds level prefabs, theme assets, audio, extensions, and deployment scripts for the Unity WebGL migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 15:30:58 +08:00
parent cba5105908
commit d393302388
6248 changed files with 17322729 additions and 11036 deletions

View File

@@ -4,20 +4,27 @@
<meta charset="utf-8" />
<title>主站 Cocos Web</title>
<style>
html, body { margin: 0; padding: 0; height: 100%; background: #1a1a2e; }
#GameDiv { width: 100%; height: 100%; }
#bar { color: #fff; font-family: sans-serif; padding: 8px; }
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>
function processData(json) { console.log('processData', JSON.parse(json)); }
function processVehicleData(json) { console.log('processVehicleData', JSON.parse(json)); }
function externalResult(json) { console.log('externalResult', JSON.parse(json)); }
function externalLevelInfo(json) { console.log('externalLevelInfo', JSON.parse(json)); }
function coinsData(json) { console.log('coinsData', JSON.parse(json)); }
// 主站可覆写钩子接收关卡 ID
window.__tfrhOnExternalLevelInfo = function (json) {
const data = JSON.parse(json);
console.log('关卡就绪 LevelID=', data.LevelID, data);
};
</script>
<!-- 构建后将 Cocos 生成的 index.js 引入此页 -->
</body>