<reponame>jt-moriarty/ggj2023<filename>GGJ 2023 Project/Assets/Scripts/UI/Meter.csusing System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Meter : MonoBehaviour
{
    [SerializeField]
    private Image meterFill;

    private GameController controller;

    // Start is called before the first frame update
    void Start()
    {
        controller = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>();
    }

    // Update is called once per frame
    void Update()
    {
        meterFill.fillAmount = Mathf.Clamp((float)controller.Energy/100f,0f,1f);
    }
}
