有关区分两个不同的返回值(true)的问题?
boolean isPengzhuang(int bx1, int by1, int w1, int h1, int x1, int y1 ){
if(x1 > bx1 - 5 && x1 < bx1 + w1){
if(y1 == by1 || y1 == by1 +h1){
return true ;
}
}
if(y1 > by1 && y1 < by1 + h1){
if(x1 == bx1 || x1 == bx1 + w1){
return true;
}
}
return false;
}
我在接收这两个返回值:true的时候怎么去区分他们,两个true有不同的作用,总不能一起true了一起执行代码吧,那样我的程序就乱了,请各位过客各抒己见帮帮我。