Package com.mygdx.game.AI
Class Node
java.lang.Object
com.mygdx.game.AI.Node
public class Node
extends java.lang.Object
A node in the A* pathfinding graph
-
Field Summary
Fields Modifier and Type Field Description floatcost -
Constructor Summary
Constructors Constructor Description Node(float x, float y)Position the node exists at -
Method Summary
Modifier and Type Method Description com.badlogic.gdx.math.Vector2getPosition()voidset(float x, float y)Sets positionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
cost
public float cost
-
-
Constructor Details
-
Node
public Node(float x, float y)Position the node exists at- Parameters:
x- co-ordy- co-ord
-
-
Method Details
-
getPosition
public com.badlogic.gdx.math.Vector2 getPosition() -
set
public void set(float x, float y)Sets position- Parameters:
x- co-ordy- co-ord
-