Exemplo n.º 1
0
 /**
  * Remove an object from the world.
  *
  * @param object the object to remove
  */
 public synchronized void removeObject(Actor object) {
   if (objects.remove(object)) {
     // we only want to remove it once.
     collisionChecker.removeObject(object);
   }
   object.setWorld(null);
 }
Exemplo n.º 2
0
  /**
   * Remove an object from the world.
   *
   * @param object the object to remove
   */
  public void removeObject(Actor object) {
    if (object == null || object.world != this) {
      return;
    }

    objectsDisordered.remove(object);
    collisionChecker.removeObject(object);
    if (objectsDisordered != objectsInActOrder && objectsInActOrder != null) {
      objectsInActOrder.remove(object);
    } else if (objectsDisordered != objectsInPaintOrder && objectsInPaintOrder != null) {
      objectsInPaintOrder.remove(object);
    }
    object.setWorld(null);
  }