有人能告诉我这个脚本有什么问题吗?
#pragma strict
private var dead = false;
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if(hit.gameObject.tag == "Respawn")
{
dead = true;
}
}
function Update ()
{
if(dead)
{
transform.position = Vector3(0,0,0);
dead = false;
}
}
}