Class Path

  • All Implemented Interfaces:
    com.badlogic.gdx.ai.pfa.Connection<Node>

    public class Path
    extends java.lang.Object
    implements com.badlogic.gdx.ai.pfa.Connection<Node>
    The path that exists between 2 nodes not bidirectional
    • Constructor Summary

      Constructors 
      Constructor Description
      Path​(Node f, Node t)
      Creates a path from F to T
    • Constructor Detail

      • Path

        public Path​(Node f,
                    Node t)
        Creates a path from F to T
        Parameters:
        f - the start Node
        t - the end Node
    • Method Detail

      • getCost

        public float getCost()
        Specified by:
        getCost in interface com.badlogic.gdx.ai.pfa.Connection<Node>
        Returns:
        the cost of traveling the path
      • getFromNode

        public Node getFromNode()
        Specified by:
        getFromNode in interface com.badlogic.gdx.ai.pfa.Connection<Node>
        Returns:
        the start node of the path
      • getToNode

        public Node getToNode()
        Specified by:
        getToNode in interface com.badlogic.gdx.ai.pfa.Connection<Node>
        Returns:
        the end node of the path