Adds level prefabs, theme assets, audio, extensions, and deployment scripts for the Unity WebGL migration. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
566 B
TypeScript
14 lines
566 B
TypeScript
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}`;
|
||
}
|