Esempio n. 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;
  }