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
    float cost  
  • 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.Vector2 getPosition()  
    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 Details

    • cost

      public float cost
  • Constructor Details

    • Node

      public Node​(float x, float y)
      Position the node exists at
      Parameters:
      x - co-ord
      y - 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-ord
      y - co-ord