Esempio n. 1
0
  /**
   * Get the item which has a rectangle containing the given point.
   *
   * @return null if none contain the point
   */
  public Item getItemAtPos(Vec2f pos) {
    for (Rect4f rect : items.keySet()) {
      if (rect.contains(pos)) return items.get(rect);
    }

    return null;
  }