IEnumerator AttackCoroutine(string type)
    {
        anim.SetTrigger(type);
        attackStats.SetDamage(type, baseDamage);
        yield return(new WaitForSeconds(0.9f));

        attacking = false;
    }
 private void Attack(string type)
 {
     animator.SetTrigger(type);
     attackStats.SetDamage(type, baseDamage);
     attackEvent?.Invoke(type);
 }