예제 #1
0
  /**
   * Returns the item at location (x,y) in grid space
   *
   * @param x
   * @param y
   * @return null, if no item there, else a valid PickupableItem
   */
  public PickupableItem PickupableAt(int x, int y) {

    for (PickupableItem m : m_pickupables) {
      if (m.getX() == x && m.getY() == y) {
        return m;
      }
    }

    return null;
  }
예제 #2
0
 /**
  * Renders all items to the screen
  *
  * @param map
  */
 public void renderAll(Map map) {
   for (PickupableItem m : m_pickupables) {
     m.render(map);
   }
 }