Skip to content
Snippets Groups Projects
Verified Commit 20c45f7c authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

fix boundingbox

parent 56bba2eb
No related merge requests found
......@@ -75,7 +75,7 @@ public class BulletAnimated implements DrawableSimulable, Collisionable{
}
public Rectangle2D getBoundingBox() {
return new Rectangle2D(position.getX(), position.getY(), size, size);
return new Rectangle2D(position.getX(), position.getY() - size, size, size);
}
public boolean overlaps(Dragon dragon) {
......
......@@ -37,7 +37,7 @@ public class Dragon implements DrawableSimulable, Collisionable{
public Rectangle2D getBoundingBox() {
return new Rectangle2D(position.getX(), position.getY(), size, size);
return new Rectangle2D(position.getX(), position.getY() - size, size, size);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment