private IEnumerator Attack() { attacking = true; animator.SetTrigger("Attack"); player.Hit(damage, default(RaycastHit), false); yield return(new WaitForSeconds(attackCooldown)); attacking = false; }