Package com.prineside.tdi2
Class Path.Connection
- All Implemented Interfaces:
Connection<PathNode>
- Enclosing class:
- Path
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConnection
(Array<PathNode> pathNodes, int fromNodeIdx, int toNodeIdx, boolean isTeleport, float cost) -
Method Summary
Modifier and TypeMethodDescriptionfloat
getCost()
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.Connection
Returns the non-negative cost of this connection- Specified by:
getCost
in interfaceConnection<PathNode>
- Overrides:
getCost
in classDefaultConnection<PathNode>
-
getFromNode
Description copied from interface:com.badlogic.gdx.ai.pfa.Connection
Returns the node that this connection came from- Specified by:
getFromNode
in interfaceConnection<PathNode>
- Overrides:
getFromNode
in classDefaultConnection<PathNode>
-
getToNode
Description copied from interface:com.badlogic.gdx.ai.pfa.Connection
Returns the node that this connection leads to- Specified by:
getToNode
in interfaceConnection<PathNode>
- Overrides:
getToNode
in classDefaultConnection<PathNode>
-