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

public class Enemy_stat2 : StateMachineBehaviour
{
    private bool no;
    private float wait;
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        wait = 0;
        no = false;
    }
    override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        if(no)
        {
            return;
        }
        if(wait >= 1f)
        {
            Enemy_Frog Fr = animator.GetComponent<Enemy_Frog>();
            Fr.shoot();
            no = true;
        }
        wait += Time.deltaTime;
    }
}