Не работает атака в ближнем бою у героя

ошибка ( жалуется на 24 строку ):

Assets\playerAttack.cs(24,35): error CS0246: The type or namespace name 'Enemy' could not be found (are you missing a using directive or an assembly reference?)

код :

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

public class playerAtack : MonoBehaviour
{
  private float timeBtwAttack;
  public float start;

  public Transform attackPos;
  public LayerMask enemy;
  public float attackRange;
  public int damage;
  public Animator anim;
  // Start is called before the first frame update
  // Update is called once per frame
  private void Update()
  {
    if (timeBtwAttack <= 0) {
      if (Input.GetMouseButton(0)) {
        anim.SetTrigger("attack");
        Collider2D[] enemies = Physics2D.OverlapCircleAll(attackPos.position, attackRange, enemy);
        for (int i = 0 ; i < enemies.Length; i++) {
 //жалуется на эту строку// enemies[i].GetComponent<Enemy>().TakeDamage(damage);
        }
      }
      timeBtwAttack = startTimeBtwAttack;
    }
    else {
      timeBtwAttack -= Time.deltaTime;
    }

  }
  private void OnDrawGizmosSelectid(){
    Gizmos.color = Color.red;
    Gizmos.DrawWireSphere(attackPos.position, attackRange);
  }
}

Ответы (0 шт):