using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class ClassResourceUIElement : MonoBehaviour { public Image fill; public TMP_Text thresholdText; public GameTag classTag; public ClassResource respectiveResource; public void OnResourceChanged(float value) { fill.fillAmount = value / respectiveResource.GetMaxValue(); } }