CombatNodeComponent 战斗节点功能补全
- 失败逻辑补全:添加基地血量,当血量归0时强制结束关卡 - `CombatInfoForm` 刷新逻辑补全:通过订阅 `CombatCoinChanged/Process/BaseHpChangedEventArgs` 来更新 UI,同时可以避免一点小变动刷新整个 UI - `CombatSelectForm` 逻辑优化:订阅 `CombatCoinChanged` 来实时更新当前 Coin 是否满足操作条件
This commit is contained in:
@@ -12,6 +12,8 @@ namespace GeometryTD.UI
|
||||
[SerializeField] private TMP_Text _levelPhaseText;
|
||||
|
||||
[SerializeField] private TMP_Text _coinText;
|
||||
|
||||
[SerializeField] private TMP_Text _baseHpText;
|
||||
|
||||
[SerializeField] private CommonButton _pauseButton;
|
||||
|
||||
@@ -37,6 +39,11 @@ namespace GeometryTD.UI
|
||||
{
|
||||
_coinText.text = context?.CoinText ?? "0";
|
||||
}
|
||||
|
||||
if (_baseHpText != null)
|
||||
{
|
||||
_baseHpText.text = context?.BaseHpText ?? string.Empty;
|
||||
}
|
||||
|
||||
if (_pauseButton != null)
|
||||
{
|
||||
@@ -100,6 +107,11 @@ namespace GeometryTD.UI
|
||||
{
|
||||
_coinText.text = string.Empty;
|
||||
}
|
||||
|
||||
if (_baseHpText != null)
|
||||
{
|
||||
_baseHpText.text = string.Empty;
|
||||
}
|
||||
|
||||
base.OnClose(isShutdown, userData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user