using UnityEngine;
public class FiringState : BaseState
{
    private float _enterTime;
    private float _duration;

    public FiringState(PlayerController player, float duration = 0) : base(player)
    {
        _duration = duration;
    }

    public override void OnEnter()
    {
        controller.AttackInstance.OnButtonPressed(controller);
        _enterTime = Time.time;
    }

    public override BaseState Update()
    {
        if (Time.time - _enterTime > _duration)
            return new ActiveState(controller);

        return null;
    }

    public override void OnExit()
    {

    }

    public override BaseState HandleInput()
    {
        return null;
    }
}