The type or namespace name `List`1' could not be found. Are you missing a using directive or an assembly reference?

Hello,i have a question about “List”!!
the erro is :The type or namespace name List1’ could not be found. Are you missing a using directive or an assembly reference?

here is my script:

using UnityEngine;
using System.Collections;

public class AIgiant_emeny : MonoBehaviour {


private  float Atimer;

public float AttackSpeed=1;

public float AttackRange=5;

public float damage=10;

//WHEN THE DAMAGE HAS BEEN DEALT
	private bool damdealt;


    public Transform AICharacter;

	  public Transform target;

	public int TotalAICount;

	private bool CanSeeTarget;
	//ANIMATIONS
    public AnimationClip RunAnimation;

	public AnimationClip IdleAnimation;

	public AnimationClip AttackAnimation;

	public AnimationClip DeathAnimation;

	private bool stop;

	private bool Swing;

	public bool IsDead;

	private bool DeadPlayed;

	private bool Search;
	
	private bool dealdamage;
	private bool kill=true;
	
	
public float  moveSpeed  = -1;

public float rotationSpeed  = 3;

public bool EnableCombat=true;

public const int ENEMY_STAND = 0;
public const int ENEMY_ATTACK = 1;
public const int ENEMY_RUN = 2;
public const int ENEMY_WALK = 3;

private int enemyState;

private GameObject  player ;
public  int AI_ATTACK_DISTANCE = 3;
public int AI_ATTACK_Range = 2;

private float backUptime;

public int AI_THINK_TIME = 1;

private Vector3 instantVelocity ;

public List KillList;


void Start () 
{
		if(AICharacter){}

		else AICharacter=transform;
		
			if (target == null && GameObject.FindWithTag("player")) 
			target = GameObject.FindWithTag("player").transform;
}

void Update ()
{

if(IsDead){
			if(DeathAnimation){
			if(DeadPlayed){}
            else AICharacter.animation.CrossFade( DeathAnimation.name, 0.1f);	
			DeadPlayed=true;
			
			
			}
		}
		
else{
			
	
	if(Search){}
			else{
				
var Distance=Vector3.Distance( target.transform.position,this.transform.position);

if(Distance <= AI_ATTACK_DISTANCE)
{
			
transform.LookAt(target);
if(Distance  1)
{
Vector3  moveVector = pdir * moveSpeed * Time.deltaTime* 10;

      transform.position += moveVector;
     }
break;

case ENEMY_ATTACK:
										
			
if(kill){
				
			atime+=Time.deltaTime;
			animation[Attack.name].speed = animation[Attack.name].length / AttackSpeed;
		animation.CrossFade( Attack.name, 0.15f);
				
				
				
					if(damdealt){}
							else{
			
			if(atime>=AttackSpeed*0.35f&atime<=AttackSpeed*0.48f){
					
						
			if(KillList.Count>0){
				int	ls=KillList.Count;
				for (int i = 0; i < ls; i++){
								
								
								
								
								
								
				HP_player hp=(HP_player)KillList*.transform.GetComponent("HP_player");*
  •  					if(hp.CurrentHealth>0){*
    
  •  							kill=true;*
    
  •  						}*
    
  •  					hp.CurrentHealth=hp.CurrentHealth-damage;*
    
  •  						damdealt=true;*
    
  •  					if(hp.Dead){}*
    
  •  					else if(hp.CurrentHealth<=0)TotalAICount=TotalAICount-1;*
    
  •  			}*
    
  •  		}*
    
  •  	}*
    
  •  		}*
    
  •  	if(atime>=AttackSpeed){*
    
  •  			damdealt=false;*
    
  •  		atime=0;*
    
  •  	}*
    
  •  }*
    

break;

}

  • }*

  • void OnTriggerEnter(Collider other){*

  •  //ADD AIS TO LIST TO INFLICT DAMAGE IF IN RANGE*
    
  •  HP_player AI=(HP_player)other.transform.GetComponent("HP_player");*
    
  •  if(AI){*
    
  •  KillList.Add(other.transform);*
    
  •  }*
    
  • }*

  • void OnTriggerExit(Collider other){*

  •  //REMOVE FROM LIST WHEN OUT OF RANGE*
    
  •  HP_player AI=(HP_player)other.transform.GetComponent("HP_player");*
    
  •  if(AI){*
    
  •  KillList.Remove(other.transform);*
    
  •  }*
    

}
}

You need to be using Generic Collections:

using System.Collections.Generic;

FYI you can right-click on a bad List<> in MonoDevelop, go “Refactor”, then “using System.Collections.Generic” and it will automatically add the import at the top.