Files

18 lines
799 B
GDScript
Raw Permalink 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.
## 营地刷新单口:各写口尾→现开界面刷新+场景根 HUD 刷新一闸完成(卡⑤ HUD 同口挂接)。
## 非 autoload、非信号广播——组合根单点推送(组合根建件绑册,presenter 经 context 持引用;
## 卡④ 契约 4:写口语义零改,只改路由形态)。
class_name CampRefreshBus
extends RefCounted
var _targets: Array[Control] = [] # 可刷面册(四子界面+卡⑤ HUD 栏——均带 refresh_camp(data))
func bind_targets(targets: Array[Control]) -> void:
_targets = targets
func refresh(camp_data: Dictionary) -> void:
for t in _targets:
if t != null and t.visible and t.has_method("refresh_camp"):
t.refresh_camp(camp_data) # 现开界面就地重刷(未开的零开销——留底形态下场景根恒开)