Class Path.Connection

java.lang.Object
com.badlogic.gdx.ai.pfa.DefaultConnection<PathNode>
com.prineside.tdi2.Path.Connection
All Implemented Interfaces:
com.badlogic.gdx.ai.pfa.Connection<PathNode>
Enclosing class:
Path

public static class Path.Connection extends com.badlogic.gdx.ai.pfa.DefaultConnection<PathNode>
  • Field Details

    • map

      public Map map
    • isTeleport

      public boolean isTeleport
    • cost

      public float cost
    • fromIdx

      public int fromIdx
    • toIdx

      public int toIdx
  • Constructor Details

    • Connection

      public Connection(Map map, int fromNodeIdx, int toNodeIdx, boolean isTeleport, float cost)
  • Method Details

    • getCost

      public float getCost()
      Description copied from interface: com.badlogic.gdx.ai.pfa.Connection
      Returns the non-negative cost of this connection
      Specified by:
      getCost in interface com.badlogic.gdx.ai.pfa.Connection<PathNode>
      Overrides:
      getCost in class com.badlogic.gdx.ai.pfa.DefaultConnection<PathNode>
    • getFromNode

      public PathNode getFromNode()
      Description copied from interface: com.badlogic.gdx.ai.pfa.Connection
      Returns the node that this connection came from
      Specified by:
      getFromNode in interface com.badlogic.gdx.ai.pfa.Connection<PathNode>
      Overrides:
      getFromNode in class com.badlogic.gdx.ai.pfa.DefaultConnection<PathNode>
    • getToNode

      public PathNode getToNode()
      Description copied from interface: com.badlogic.gdx.ai.pfa.Connection
      Returns the node that this connection leads to
      Specified by:
      getToNode in interface com.badlogic.gdx.ai.pfa.Connection<PathNode>
      Overrides:
      getToNode in class com.badlogic.gdx.ai.pfa.DefaultConnection<PathNode>