Package com.prineside.tdi2
Class Path.Connection
- All Implemented Interfaces:
Connection<PathNode>
- Enclosing class:
- Path
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConnection(Array<PathNode> pathNodes, int fromNodeIdx, int toNodeIdx, boolean isTeleport, float cost) -
Method Summary
Modifier and TypeMethodDescriptionfloatgetCost()Returns the non-negative cost of this connectionReturns the node that this connection came fromReturns the node that this connection leads to
-
Field Details
-
pathNodes
-
isTeleport
public boolean isTeleport -
cost
public float cost -
fromIdx
public int fromIdx -
toIdx
public int toIdx
-
-
Constructor Details
-
Connection
-
-
Method Details
-
getCost
public float getCost()Description copied from interface:com.badlogic.gdx.ai.pfa.ConnectionReturns the non-negative cost of this connection- Specified by:
getCostin interfaceConnection<PathNode>- Overrides:
getCostin classDefaultConnection<PathNode>
-
getFromNode
Description copied from interface:com.badlogic.gdx.ai.pfa.ConnectionReturns the node that this connection came from- Specified by:
getFromNodein interfaceConnection<PathNode>- Overrides:
getFromNodein classDefaultConnection<PathNode>
-
getToNode
Description copied from interface:com.badlogic.gdx.ai.pfa.ConnectionReturns the node that this connection leads to- Specified by:
getToNodein interfaceConnection<PathNode>- Overrides:
getToNodein classDefaultConnection<PathNode>
-