Example #1
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);
  }
Example #2
0
  @Override
  protected boolean testEntity(Overlay entity) {
    boolean test = super.testEntity(entity);

    if (entity.getArea() == null) {
      log.warn("Entity [" + entity + "] must define area aspect.");
      test = false;
    }

    return test;
  }