恢复总费用

This commit is contained in:
xianyi
2025-08-20 16:08:18 +08:00
parent 6bacf3cb39
commit f0c1643f30
17 changed files with 39 additions and 1572 deletions

View File

@@ -18,10 +18,6 @@ namespace TcgEngine.UI
public Text pname;
public AvatarUI avatar;
public IconBar mana_bar; // 保留原有mana条作为通用mana显示
[Header("Team Mana Bars")]
public IconBar[] team_mana_bars = new IconBar[3]; // ManaBar_0, ManaBar_1, ManaBar_2
public Text hp_txt;
public Text hp_max_txt;
@@ -77,49 +73,6 @@ namespace TcgEngine.UI
mana_bar.value = player.mana;
mana_bar.max_value = player.mana_max;
// 更新阵营mana条 - fire, forest, water
if (team_mana_bars.Length >= 3)
{
// ManaBar_0 = fire
if (team_mana_bars[0] != null)
{
team_mana_bars[0].value = player.mana_fire;
team_mana_bars[0].max_value = player.mana_max;
}
else
{
Debug.LogWarning("team_mana_bars[0] is null!");
}
// ManaBar_1 = forest
if (team_mana_bars[1] != null)
{
team_mana_bars[1].value = player.mana_forest;
team_mana_bars[1].max_value = player.mana_max;
}
else
{
Debug.LogWarning("team_mana_bars[1] is null!");
}
// ManaBar_2 = water
if (team_mana_bars[2] != null)
{
team_mana_bars[2].value = player.mana_water;
team_mana_bars[2].max_value = player.mana_max;
}
else
{
Debug.LogWarning("team_mana_bars[2] is null!");
}
}
else
{
Debug.LogWarning($"team_mana_bars.Length = {team_mana_bars.Length}, expected 3");
}
hp_txt.text = prev_hp.ToString();
hp_max_txt.text = "/" + player.hp_max.ToString();