Class Node


  • public class Node
    extends java.lang.Object
    A node in the A* pathfinding graph
    • Field Summary

      Fields 
      Modifier and Type Field Description
      float cost  
    • Constructor Summary

      Constructors 
      Constructor Description
      Node​(float x, float y)
      Position the node exists at
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.badlogic.gdx.math.Vector2 getPosition()
      Position the node exists at
      void set​(float x, float y)
      Sets position
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cost

        public float cost
    • Constructor Detail

      • Node

        public Node​(float x,
                    float y)
        Position the node exists at
        Parameters:
        x - co-ord
        y - co-ord
    • Method Detail

      • getPosition

        public com.badlogic.gdx.math.Vector2 getPosition()
        Position the node exists at
        Returns:
        the position of the node
      • set

        public void set​(float x,
                        float y)
        Sets position
        Parameters:
        x - co-ord
        y - co-ord