RiftMayhem/Assets/Scripts/UI/ClassResourceUIElement.cs
Pedro Gomes e1081a2bf4 Necromancer and Minions update
- Necromancer class playable
- Savage minion ability & npc
- Mage minion ability & npc
- rogue minion ability & npc
- warrior minion ability & npc
- golem minion ability & npc
- minion abilities
- Class resource (used to automatically summon minions based on the amount of souls drained, in case of necromancer)
- class resource spender (auto cast from priority list)
- class resource regen instant effect option
2024-07-22 16:46:13 +01:00

20 lines
432 B
C#

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