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

public class ExaustedState : MonoBehaviour
{
    public IdleState IdleState;
    private float timer;
    public float Duration;

    // Start is called before the first frame update
    void OnEnable()
    {
        timer = 0;
    }

    // Update is called once per frame
    void Update()
    {
        timer += Time.deltaTime;
        if(timer > Duration)
        {
            enabled = false;
            IdleState.enabled = true;
        }
    }
}
