|
|
@@ -125,6 +125,7 @@ public class AgentInfoPanel : MonoBehaviour
|
|
|
UpdateStatDisplay("DexterityBar", "DexterityValue", group.CombinedDexterity);
|
|
|
UpdateStatDisplay("IntelligenceBar", "IntelligenceValue", group.CombinedIntelligence);
|
|
|
UpdateStatDisplay("ConstitutionBar", "ConstitutionValue", group.CombinedConstitution);
|
|
|
+ UpdateStatDisplay("HealthBar", "HealthValue", group.CombinedHealth, maxValue: group.Size * 110);
|
|
|
var totalLabel = panelRoot.Q<Label>("TotalStatsValue");
|
|
|
if (totalLabel != null)
|
|
|
totalLabel.text = (group.CombinedStrength + group.CombinedSpeed + group.CombinedMagic
|
|
|
@@ -139,6 +140,7 @@ public class AgentInfoPanel : MonoBehaviour
|
|
|
UpdateStatDisplay("DexterityBar", "DexterityValue", stats.Dexterity);
|
|
|
UpdateStatDisplay("IntelligenceBar", "IntelligenceValue", stats.Intelligence);
|
|
|
UpdateStatDisplay("ConstitutionBar", "ConstitutionValue", stats.Constitution);
|
|
|
+ UpdateStatDisplay("HealthBar", "HealthValue", stats.Health, maxValue: 110);
|
|
|
var totalLabel = panelRoot.Q<Label>("TotalStatsValue");
|
|
|
if (totalLabel != null)
|
|
|
totalLabel.text = stats.GetTotalStats().ToString();
|
|
|
@@ -164,13 +166,13 @@ public class AgentInfoPanel : MonoBehaviour
|
|
|
/// <summary>
|
|
|
/// Updates a stat display (progress bar and label)
|
|
|
/// </summary>
|
|
|
- private void UpdateStatDisplay(string barName, string labelName, int value)
|
|
|
+ private void UpdateStatDisplay(string barName, string labelName, int value, int maxValue = 100)
|
|
|
{
|
|
|
var bar = panelRoot.Q<ProgressBar>(barName);
|
|
|
if (bar != null)
|
|
|
{
|
|
|
+ bar.highValue = maxValue;
|
|
|
bar.value = value;
|
|
|
- bar.highValue = 100;
|
|
|
}
|
|
|
|
|
|
var label = panelRoot.Q<Label>(labelName);
|