Capacity + Health and Mana bars

This commit is contained in:
Crizomb 2025-01-21 12:59:14 +01:00
parent b21d392ff6
commit 7d3b4ced0e
41 changed files with 1739 additions and 32 deletions

View file

@ -0,0 +1,21 @@
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
public class ManaBars : MonoBehaviour
{
[SerializeField] private BaseCapacity capacity;
[SerializeField] private Slider manaSlider;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
manaSlider.maxValue = capacity.MaxMana;
}
void Update()
{
manaSlider.value = capacity.Mana;
}
// Child of healthbar, rotation is handled by healthbar
}