Files
Continentis/Assets/Scripts/MainGame/UI/DeckUIPage/CombatResourceIcon.cs
SoulliesOfficial 9b1b5ca93f initial
2025-10-03 00:02:43 -04:00

27 lines
961 B
C#

using Continentis.MainGame.Character;
using TMPro;
using UnityEngine;
namespace Continentis.MainGame.UI
{
public class CombatResourceIcon : UIElementBase
{
public string currentAttributeName;
public string maximumAttributeName;
public TMP_Text resourceText;
public void Initialize(string currentAttributeName, string maximumAttributeName)
{
this.currentAttributeName = currentAttributeName;
this.maximumAttributeName = maximumAttributeName;
}
public void SetInfoText(CharacterBase character)
{
int currentValue = character.attributeSubmodule.GetRoundCurrentGeneralAttribute(currentAttributeName);
int maximumValue = character.attributeSubmodule.GetRoundCurrentGeneralAttribute(maximumAttributeName);
string displayText = currentValue + "/" + maximumValue;
resourceText.text = displayText;
}
}
}