按 code-conventions §1.4.1 第三轮定稿执行:core 22+schemas 18+presentation 根 14+views 28,全部头注 #→##、删日期/变更叙事/GDD 与架构反向链接/字段与域清单/机制描述,保留职责摘要+真实使用约束(防事故禁令/单一入口/信号契约每信号一行)。main.gd 31→5 行、save_manager 45→5 行、adventure_runner 37→5 行为最大单件。子代理分模块执行(波一 core+schemas、波二 presentation+views,并发≤2)。验收=tools/verify_comment_only_change.py 逐字节校验(82 文件头注区外逐行一致=零行为变更)+audit_file_headers 全绿;纯注释批免冒烟(先例 5843270)
39 lines
1.3 KiB
GDScript
39 lines
1.3 KiB
GDScript
## VERTICAL SLICE - NOT FOR PRODUCTION
|
||
## 关卡节点覆盖层(模态):奖励点/恢复点兑付结果的确认呈现;节点文案的玩家可读化内聚于此。
|
||
class_name NodeOverlay
|
||
extends Control
|
||
|
||
signal continue_pressed
|
||
|
||
var _label: Label
|
||
var _btn: Button
|
||
|
||
|
||
func _init() -> void:
|
||
# M5(UI 落码批):rest 兑付面板 plate9 石板化+暖金头带字(demo ④休息弹层;暗字上亮板 §7.2)
|
||
var shell: Dictionary[Variant, Variant] = UiKit.modal_shell(self, Color(0, 0, 0, 0.6), Vector2.ZERO, 14, true,
|
||
UiKit.panel_skinned(Vector4(26, 18, 26, 18)))
|
||
var box: VBoxContainer = shell.box
|
||
_label = UiKit.label("",UiKit.FS_SUB, true, UiKit.INK_TITLE)
|
||
_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||
box.add_child(_label)
|
||
_btn = UiKit.primary_button("继续")
|
||
_btn.pressed.connect(_emit_continue_pressed)
|
||
box.add_child(_btn)
|
||
visible = false
|
||
|
||
|
||
func show_rest(healed: int, hp_after: int, max_hp: int) -> void:
|
||
_label.text = "血量恢复点\n休息回复 %d HP(%d → %d / %d)" % [
|
||
healed, hp_after - healed, hp_after, max_hp]
|
||
_btn.text = "休息完毕,继续"
|
||
visible = true
|
||
|
||
# 探针复用:以真实按钮路径触发继续
|
||
func press_continue() -> void:
|
||
_btn.pressed.emit()
|
||
|
||
|
||
func _emit_continue_pressed() -> void:
|
||
continue_pressed.emit()
|