Example #1
0
  /**
   * Interact with what is in front of you.
   *
   * @return if there was a object to interact with
   */
  public boolean interact() {
    MapObject object = map.getObject(getPosition().get(getViewDirection()));

    if (object != null) {
      object.react(this);
      return true;
    } else return false;
  }
Example #2
0
 public boolean isAccessable(int x, int y) {
   return map.accessable(x, y);
 }