Ejemplo n.º 1
0
 protected void Attack(List <BaseEntity> enemies)
 {
     if (_canAttack)
     {
         _canAttack = false;
         BaseProjectile newProjectile = _projectilePool.GetProjectile(projectile.GetProjectileType());
         newProjectile.MoveTo(transform.position);
         newProjectile.transform.SetParent(transform);
         newProjectile.Launch(enemies[0]);
         StartCoroutine(AttackCooldown(GetCooldown()));
     }
 }