allow resetting the TileMap object being checked for collisions

This commit is contained in:
Gered 2013-09-14 23:11:09 -04:00
parent 890becd05b
commit b791a041a2

View file

@ -17,17 +17,13 @@ public class TileMapSweptSphereCollisionChecker implements SweptSphereWorldColli
static final Vector3 b = new Vector3();
static final Vector3 c = new Vector3();
TileMap tileMap;
public TileMapSweptSphereCollisionChecker(TileMap tileMap) {
if (tileMap == null)
throw new IllegalArgumentException("tileMap can not be null.");
this.tileMap = tileMap;
}
public TileMap tileMap;
@Override
public void checkForCollisions(SweptSphere sphere, BoundingBox possibleCollisionArea) {
if (tileMap == null)
throw new UnsupportedOperationException("No TileMap object is set.");
min.set(0, 0, 0);
max.set(0, 0, 0);