public IEnumerator Shoot() { _shooting = true; yield return(new WaitForSeconds(1f)); _animator.Shoot(); Instantiate(_ammo, transform.position, transform.rotation); _shooting = false; manager.StartAttacking(); }
public IEnumerator Smash() { anim.SetTrigger("Prepare"); RandLane = (Lanes)Random.Range(0, 3); anim.SetTrigger(prefix + RandLane); yield return(new WaitForSeconds(1.5f)); anim.SetBool("Smash", true); yield return(new WaitForSeconds(1f)); anim.SetBool("Smash", false); manager.StartAttacking(); }