Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class HealthBar : MonoBehaviour
- {
- [SerializeField] Slider slider;
- [SerializeField] Image fill;
- public void SetMaxHealth(int health)
- {
- slider.maxValue = health;
- slider.value = health;
- }
- public void SetHealth(int health)
- {
- slider.value = health;
- }
- }
Add Comment
Please, Sign In to add comment