Package com.prineside.tdi2.pathfinding
Class PathConnection
java.lang.Object
com.badlogic.gdx.ai.pfa.DefaultConnection<HeavyPathNode>
com.prineside.tdi2.pathfinding.PathConnection
- All Implemented Interfaces:
Connection<HeavyPathNode>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
int
boolean
int
-
Constructor Summary
ConstructorsConstructorDescriptionPathConnection
(Array<HeavyPathNode> 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
-
PathConnection
public PathConnection(Array<HeavyPathNode> pathNodes, 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 interfaceConnection<HeavyPathNode>
- Overrides:
getCost
in classDefaultConnection<HeavyPathNode>
-
getFromNode
Description copied from interface:com.badlogic.gdx.ai.pfa.Connection
Returns the node that this connection came from- Specified by:
getFromNode
in interfaceConnection<HeavyPathNode>
- Overrides:
getFromNode
in classDefaultConnection<HeavyPathNode>
-
getToNode
Description copied from interface:com.badlogic.gdx.ai.pfa.Connection
Returns the node that this connection leads to- Specified by:
getToNode
in interfaceConnection<HeavyPathNode>
- Overrides:
getToNode
in classDefaultConnection<HeavyPathNode>
-