[code=javascript]function Update () {
var aa = GameObject.Find("tishen");
var bb =
GameObject.Find("xar");
var dis : float
=Vector3.Distance(aa.transform.position, bb.transform.position);
if (
dis>5.0 && dis<=7.0 )
{
animation.Play("xarzx");
}
else if (dis>7.0)
{
animation.Play("idle");
}
else