Examples of FixedPath


Examples of games.stendhal.server.core.pathfinder.FixedPath

        nodes.add(new Node(10, 92));
        nodes.add(new Node(10, 91));
        nodes.add(new Node(9, 91));
        nodes.add(new Node(9, 82));
        nodes.add(new Node(8, 82));
        setPath(new FixedPath(nodes, true));

      }

      @Override
      protected void createDialog() {
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

      final List<Node> nodes = new LinkedList<Node>();
      nodes.add(new Node(x, y));
      nodes.add(new Node(x - 2, y));
      nodes.add(new Node(x - 2, y - 2));
      nodes.add(new Node(x, y - 2));
      setPath(new FixedPath(nodes, true));
    }
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

        // create path back
        for (int j = path.size() - 1; j > 0; j--) {
          path.add(path.get(j));
        }
        logger.debug(path);
        speakerNPC.setPath(new FixedPath(path, true));
        break;
      }
    }

    // Schedule so we are notified again in 5 minutes
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

    if (hasPath()) {
      Node node = guide.path.getDestination();
      final List<Node> path = Path.searchPath(this, node.getX(), node.getY());

      if (path.size() >= 1) {
        setPath(new FixedPath(path, false));
      } else {
        /*
         * It can happen that some other entity goes to occupy the
         * target position after the path has been planned. Just
         * stop if that happens and we are next to the goal.
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

    if (description != null) {
      npc.setDescription(description);
    }

    final List<Node> path = getPath(ctx);
    npc.setPath(new FixedPath(path, path.size() > 0));
    npc.setDirection(getDirection(ctx));

    createDialog(npc);

    return npc;
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

    } else if ((squaredDistance(destEntity) > max)) {
      logger.debug("Creating path because (" + getX() + "," + getY()
          + ") distance(" + destEntity.getX() + ","
          + destEntity.getY() + ")>" + max);
      final List<Node> path = Path.searchPath(this, destEntity, maxPathRadius);
      setPath(new FixedPath(path, false));
    }
  }
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

    final int dy = Rand.rand(dist2_1) - distance;

    final List<Node> path = new ArrayList<Node>(1);
    path.add(new Node(x + dx, y + dy));

    setPath(new FixedPath(path, false));
  }
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

        nodes.add(new Node(34, 4));
        nodes.add(new Node(30, 4));
        nodes.add(new Node(30, 14));
        nodes.add(new Node(32, 14));
        nodes.add(new Node(32, 13));
        setPath(new FixedPath(nodes, true));
      }

      @Override
      protected void createDialog() {
        addGreeting("Hello my friend. Nice day for walking isn't it?");
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

        final List<Node> nodes = new LinkedList<Node>();
        nodes.add(new Node(4, 4));
        nodes.add(new Node(4, 9));
        nodes.add(new Node(12, 9));
        nodes.add(new Node(12, 4));
        setPath(new FixedPath(nodes, true));
      }

      @Override
      protected void createDialog() {
        addGreeting("Welcome to the Kobold City of Wofol. I hope you come in peace.");
View Full Code Here

Examples of games.stendhal.server.core.pathfinder.FixedPath

        final List<Node> nodes = new LinkedList<Node>();
        nodes.add(new Node(4, 17));
        nodes.add(new Node(4, 27));
        nodes.add(new Node(7, 27));
        nodes.add(new Node(7, 17));
        setPath(new FixedPath(nodes, true));

      }

      @Override
      protected void createDialog() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.