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:
13
assets/scripts/level/LevelPrefabPaths.ts
Normal file
13
assets/scripts/level/LevelPrefabPaths.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { LevelConfig } from './LevelTypes';
|
||||
|
||||
/** 关卡预制体在 resources 下的路径(与 Unity Assets/Prefabs/Level/LevelN.prefab 对应) */
|
||||
function asTrimmedPath(v: unknown): string | undefined {
|
||||
if (v == null) return undefined;
|
||||
const s = (typeof v === 'string' ? v : String(v)).trim();
|
||||
return s || undefined;
|
||||
}
|
||||
|
||||
/** 与 Unity levelPath 一致:Level91601.prefab → level-prefabs/Level91601 */
|
||||
export function getLevelPrefabResourcePath(levelID: number, _config?: LevelConfig | null): string {
|
||||
return `level-prefabs/Level${levelID}`;
|
||||
}
|
||||
Reference in New Issue
Block a user