Ejemplo n.º 1
0
 /**
  * Get all the entities who are touching this entity
  *
  * @param dest A list to store the entities in, or null, to construct a new one
  * @return dest, or a new List if dest was null
  */
 public final List<Entity> checkCollisions(List<Entity> dest) {
   if (node != null) {
     return node.checkCollisions(this, dest);
   } else {
     // Haven't got a node in the quadtree. Use the root
     assert false : this + " is not in the quadtree!";
     return COLLISIONMANAGER.checkCollisions(this, dest);
   }
 }
Ejemplo n.º 2
0
 /**
  * Find out which entities are touching the specified rectangle
  *
  * @param rect
  * @param dest
  * @return
  */
 public static List<Entity> getCollisions(ReadableRectangle rect, List<Entity> dest) {
   return COLLISIONMANAGER.checkCollisions(rect, dest);
 }
Ejemplo n.º 3
0
 /** Process collisions */
 public static void checkCollisions() {
   COLLISIONMANAGER.checkCollisions();
 }