Load stage map into level definition

This commit is contained in:
2026-06-09 22:16:19 +08:00
parent 45a8712b00
commit 3fc9caa80b
9 changed files with 574 additions and 61 deletions
+64 -6
View File
@@ -1,10 +1,68 @@
# stage_01.map
#
# 当前文件先作为地图资源链占位:Asset 可以读取它,后续 StageMapLoader 会把
# world/camera/player/layers/collision/battle_zones 等字段解析成 LevelDefinition。
# 现阶段 WhiteboxScene 仍使用 C++ fallback 白盒地图,避免未完成 parser 影响构建。
map stage_01
world 3200 720
camera 0 0 3200 720
player_spawn 160 380
collision 0 600 3200 80
collision 230 500 220 28
collision 560 430 260 28
collision 930 510 260 28
collision 1250 420 230 28
collision 1760 500 300 28
collision 2180 455 260 28
collision 2650 515 360 28
layer background_far BackgroundFar 0.25
rect 0 0 3200 720 0.08 0.10 0.14 1.0
rect 360 120 420 220 0.13 0.16 0.21 1.0
rect 1380 90 560 260 0.12 0.15 0.20 1.0
rect 2440 140 520 210 0.13 0.16 0.21 1.0
endlayer
layer background_mid BackgroundMid 0.55
rect 80 360 280 240 0.18 0.22 0.27 1.0
rect 1020 310 340 290 0.18 0.22 0.27 1.0
rect 2020 330 360 270 0.18 0.22 0.27 1.0
rect 2860 280 260 320 0.18 0.22 0.27 1.0
endlayer
layer level_visual LevelVisual 1.0
rect 0 600 3200 80 0.62 0.68 0.73 1.0
rect 230 500 220 28 0.62 0.68 0.73 1.0
rect 560 430 260 28 0.62 0.68 0.73 1.0
rect 930 510 260 28 0.62 0.68 0.73 1.0
rect 1250 420 230 28 0.62 0.68 0.73 1.0
rect 1760 500 300 28 0.62 0.68 0.73 1.0
rect 2180 455 260 28 0.62 0.68 0.73 1.0
rect 2650 515 360 28 0.62 0.68 0.73 1.0
endlayer
layer props_back PropsBack 1.0
rect 118 392 88 208 0.26 0.30 0.34 1.0
rect 780 250 72 180 0.26 0.30 0.34 1.0
rect 1440 300 80 300 0.26 0.30 0.34 1.0
rect 1880 360 110 240 0.26 0.30 0.34 1.0
rect 2520 390 92 210 0.26 0.30 0.34 1.0
rect 3040 315 82 285 0.26 0.30 0.34 1.0
endlayer
layer props_front PropsFront 1.0
rect 520 580 220 34 0.14 0.17 0.18 0.90
rect 1510 570 280 42 0.14 0.17 0.18 0.90
rect 2580 572 260 38 0.14 0.17 0.18 0.90
endlayer
battle_zone zone_01_intro 520 260 560 340 0 0 1940 720
spawn zone_01_enemy_a 760 560
spawn zone_01_enemy_b 980 560
endbattle_zone
battle_zone zone_02_platform 1420 250 680 350 660 0 2300 720
spawn zone_02_enemy_a 1620 560
spawn zone_02_enemy_b 1900 560
endbattle_zone
battle_zone zone_03_exit 2380 250 720 350 1600 0 1600 720
spawn zone_03_enemy_a 2580 560
spawn zone_03_enemy_b 2860 560
endbattle_zone