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; } } }