//判断当前点和目标点的距离
if(Vector2.Distance(transform.position,roadsTrans[index+1].position)<0.05f)
//定义最后一个索引
//if(index == finalIndex){
if(Vector2.Distance(transform.position,roadsTrans[finalIndex].position)<0.1f){return;}
}
//判断在后,移动在前
//判断当前点和目标点的距离
if(Vector2.Distance(transform.position,roadsTrans[index+1].position)<0.05f)
//定义最后一个索引
//if(index == finalIndex){
if(Vector2.Distance(transform.position,roadsTrans[finalIndex].position)<0.1f){return;}
}
//判断在后,移动在前