Files
cocos/tools/export_all.sh
刘宇飞 cba5105908 Initial Cocos Creator port of main-site Unity WebGL game.
Includes core gameplay, 600 exported levels, visual assets, web bridge, and bootstrap scene.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 14:57:46 +08:00

25 lines
686 B
Bash
Executable File

#!/bin/bash
# 批量导出 Unity Levels*.cs → Cocos generated ts
set -e
UNITY_ROOT="${1:-/Users/liuyufei/tfrh/主站文件/主站}"
OUT_DIR="$(dirname "$0")/../assets/scripts/level"
PY="$(dirname "$0")/export_unity_levels.py"
mkdir -p "$OUT_DIR"
export_one() {
local file="$1"
local name="$2"
echo "Exporting $file -> levels-${name}.generated.ts"
python3 "$PY" \
--input "$UNITY_ROOT/Assets/Scripts/Core/${file}" \
--output "$OUT_DIR/levels-${name}.generated.ts"
}
export_one "Levels600.cs" "600"
# 可按需取消注释:
# export_one "Levels1000.cs" "1000"
# export_one "Levels10000.cs" "10000"
echo "Done. Update LevelRegistry.ts to import new LEVELS_* maps."