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

@@ -3,6 +3,13 @@
* Web 环境下调用 window 上的全局回调
*/
/** 对齐 Unity GameManager.ExternalLevelInfo关卡加载完成时回传 */
export interface ExternalLevelInfo {
LevelID: number;
PlayerName: string;
VehicleName: string;
}
declare global {
interface Window {
processData?: (json: string) => void;
@@ -10,6 +17,8 @@ declare global {
externalResult?: (json: string) => void;
externalLevelInfo?: (json: string) => void;
coinsData?: (json: string) => void;
/** 主站对接cocos-bridge.js 可选钩子 */
__tfrhOnExternalLevelInfo?: (json: string) => void;
[key: string]: unknown;
}
}
@@ -25,4 +34,10 @@ export class JsBridge {
}
console.log(`[JsBridge] ${callbackName}`, jsonData);
}
/** Unity ExternalCallLevelInfo → Application.ExternalCall("externalLevelInfo", json) */
static notifyExternalLevelInfo(info: ExternalLevelInfo) {
const json = JSON.stringify(info);
this.call('externalLevelInfo', json);
}
}