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

public class EnergyComponent : MonoBehaviour
{
    public int Energy = 0;
    public int MaxEnergy = 5;

    public void AddEnergy(int i)
    {
        Energy = Mathf.Min(Energy + i, MaxEnergy);
    }

}
