mirror of
https://github.com/Kizuren/ShantiManti.git
synced 2026-01-10 08:29:01 +01:00
20 lines
350 B
C#
20 lines
350 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class HealthBar : MonoBehaviour
|
|
{
|
|
public PlayerHealth playerHealth;
|
|
public Slider slider;
|
|
|
|
private void Start()
|
|
{
|
|
slider.maxValue = playerHealth.health;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
slider.value = playerHealth.health;
|
|
}
|
|
}
|