Class Road

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

    public class Road
    extends java.lang.Object
    implements com.badlogic.gdx.ai.pfa.Connection<Junction>
    This class creates a road between two Junctions and calculates a cost for travelling on this road
    • Constructor Detail

      • Road

        public Road​(Junction fromJunction,
                    Junction toJunction)
        Constructs a road
        Parameters:
        fromJunction - One end of the road - the end that a patrol will start at
        toJunction - The other end of the road - the junction the patrol will end at
    • Method Detail

      • getCost

        public float getCost()
        Specified by:
        getCost in interface com.badlogic.gdx.ai.pfa.Connection<Junction>
      • getFromNode

        public Junction getFromNode()
        Specified by:
        getFromNode in interface com.badlogic.gdx.ai.pfa.Connection<Junction>
      • getToNode

        public Junction getToNode()
        Specified by:
        getToNode in interface com.badlogic.gdx.ai.pfa.Connection<Junction>