|
|
|
@ -10,7 +10,7 @@ import java.awt.geom.Rectangle2D;
@@ -10,7 +10,7 @@ import java.awt.geom.Rectangle2D;
|
|
|
|
|
public class CollisionManager { |
|
|
|
|
public static boolean CollisionDetected(Building building, Line2D travelLine, float charHeight, float charY){ |
|
|
|
|
|
|
|
|
|
if(!travelLine.intersects(building.buildingRect) && !building.buildingRect.contains(travelLine.getP1()) && !building.buildingRect.contains(travelLine.getP2())) |
|
|
|
|
if(building.buildingRect != null && !travelLine.intersects(building.buildingRect) && !building.buildingRect.contains(travelLine.getP1()) && !building.buildingRect.contains(travelLine.getP2())) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
for (Mesh mesh : building.buildingMeshes) |
|
|
|
|