62,635
社区成员




private boolean checkCollide(Bullet bullet, Object getMethod) {
if(getMethod instanceof Polygon) {
return this.getPoly().intersects(bullet.getRect());
}
if(getMethod instanceof Rectangle){
return this.getRect().intersects(bullet.getRect());
}
}
private boolean checkCollide(Bullet bullet, Object getMethod) {
boolean temp = false;
if(getMethod instanceof Polygon) {
temp = this.getPoly().intersects(bullet.getRect());
}
if(getMethod instanceof Rectangle){
temp = this.getRect().intersects(bullet.getRect());
}
return temp;
}