using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Healthbar : MonoBehaviour
{
    public Slider slider;

    void Start()
    {
        slider.maxValue = GameManager.instance.playerHealth;
        slider.value = GameManager.instance.playerHealth;
    }

    public void Update()
    {
        slider.value = GameManager.instance.playerHealth;
    }
}
