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>
This commit is contained in:
24
tools/export_all.sh
Executable file
24
tools/export_all.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user