Пример #1
0
  @Override
  public void removeEntity(Overlay overlay) {
    Preconditions.checkNotNull(overlay, "Overlay cannot be null.");

    if (overlay.isIndexed()) indexer.remove(overlay);

    getLooks().removeVisible(overlay);

    panels.remove(overlay.getParent());
  }
Пример #2
0
  /**
   * Adds an entity to the injection queue. The entity will be inserted into scene on the next
   * iteration of animation loop.
   *
   * @param entity
   */
  @Override
  public void addEntity(Overlay overlay) {
    Preconditions.checkNotNull(overlay, "Overlay cannot be null.");
    Preconditions.checkNotNull(overlay.getArea(), "Overlay AABB bracket cannot be null.");

    if (overlay.getLook() == null) log.debug("Overlay [" + overlay + "] have no look.");
    else getLooks().addVisible(overlay);

    panels.add(overlay.getParent());

    if (overlay.isIndexed()) indexer.add(overlay.getArea(), overlay);
  }