You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|