things
This commit is contained in:
parent
a17810ffeb
commit
4e91f448c9
826 changed files with 66 additions and 8 deletions
21
Assets/Scripts/UnitScripts/Bars/ManaBars.cs
Normal file
21
Assets/Scripts/UnitScripts/Bars/ManaBars.cs
Normal 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
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue