跟thread扯上关系就不成立 if(dx<x+25 && x+25<dx+dk){//在挡板范围之内 if(d==0){ d=3; }else{ d=2;}else {//在挡板的范围之外 flag=true; t.stop();