Please Help
#pragma strict
public var damage :int;
function Start () {
damage = damage;
}
function OnTriggerEnter(p : Collider){
if(p.tag == "Enemy")
{
GetComponent(EnemyHealth).HP -=damage;
Debug.Log("The Enemy got " + damage + " damage");
}
}
this line is the problem but i don't know how to fix
GetComponent(EnemyHealth).HP -=damage;
↧