#pragma strict
public var health : int = 10;





function Start () {

}


function OnTriggerEnter2D(obj: Collider2D)
{
 //if (isfriendly = 1)
//	{
//	Physics.IgnoreCollision(collision.collider, collider);
//	}
if (health > 0)
	{
	health = health - 1;
	}	
	
else
	{
	GameObject.Destroy(gameObject);
	}
}



function Update () {

}