Files
gplan-2/game/presentation/scenes/adventure_screen.gd
T

38 lines
2.1 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
class_name AdventureScreen
extends Control
# 冒险屏壳(内含关卡地图屏与战斗屏两容器)。
# 两容器视图原样构建(build_battle_ui 归 ui_assembler 纪律不变、LevelMapScreen 类视图继续
# 代码构建、零 .tscn 化改造——契约 2);战斗信号接线归组合根 main.gd(信号连接
# 只在组合根)。树序语义:本屏壳挂 main 首子位(全模态之下)——屏内 level_screen 与
# battle_root 无同时可见态(屏级互斥+模态栈遮挡),层内先后序零视觉差;
# 模态登记序不变(level_screen 实例仍按节点层与三选一层之间登记)。
# 可独立实例化(F6/headless 挂载)——V2 探针断言载体。
var battle_root: Control # 战斗屏宿主(B/C/D 三区容器——原 main._battle_root 句柄指向成员)
var stage: BattleStageView # B 区(含 log_view 明细带)
var log_view: BattleLogView
var info_panel: HeroInfoPanelView # C 区
var board_zone: BoardZoneView # D 区(含 ap_bar/board_view/toast/fx)
var board_view: BoardView # 探针兼容别名(= board_zone.board_view)
var ap_bar: ApBarView # 探针兼容别名(= board_zone.ap_bar)
var settlement_fx: SettlementFxView # 结算演出覆盖层
var level_screen: LevelMapScreen # 关卡画面(独立屏)
const UiAssembler := preload("res://presentation/ui_assembler.gd") # 构建归装配器(规范 1.1——非全局类,preload 引用)
func _ready() -> void:
mouse_filter = Control.MOUSE_FILTER_IGNORE # 屏壳=纯容器(ui_input 实证:全屏 STOP 壳会吃掉下层模态鼠标输入)
battle_root = VBoxContainer.new()
add_child(battle_root)
var battle_ui: Dictionary[Variant, Variant] = UiAssembler.build_battle_ui(battle_root, get_node("/root/ConfigDB"))
stage = battle_ui.stage
log_view = battle_ui.log_view
info_panel = battle_ui.info_panel
board_zone = battle_ui.board_zone
board_view = battle_ui.board_view
ap_bar = battle_ui.ap_bar
settlement_fx = battle_ui.settlement_fx
level_screen = LevelMapScreen.new()
add_child(level_screen)