Exemplo n.º 1
0
 public boolean isCollidingWith(SolidObject what) {
   // Test whether the collision between two solid objex is happening
   compileHull();
   what.compileHull();
   if (collisionHull.intersects(what.collisionHull)) return true;
   return false;
 }
Exemplo n.º 2
0
 public boolean isCollidingWith(Rectangle hull, SolidObject what) {
   // Same, but with raw rectangles
   what.compileHull();
   if (hull.intersects(what.collisionHull)) return true;
   return false;
 }