Sunday, July 18, 2010

Enemy Collider Script

Here is the collider script attached to the collider of the enemy


function Update () {
}
function OnTriggerEnter ( other : Collider) {

if (other.gameObject.tag == "player") {

enemymove.attacking=true;



}
}
function OnTriggerExit ( other : Collider) {

if (other.gameObject.tag == "player") {

enemymove.attacking=false;



}
}

No comments:

Post a Comment