Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Node

A pathfinder node for the A* pathfinding algorithm.

Hierarchy

  • Node

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Node(x: number, y: number): Node

Properties

gCost

gCost: number = 0

The cost of getting from the start node to this node.

hCost

hCost: number = 0

The cost of getting from this node to the end node.

heapIndex

heapIndex: number = -1

parent

parent: Node = null

The parent node.

walkable

walkable: boolean = true

Whether or not this node can be walked on.

x

x: number = 0

The X coordinate of this node.

y

y: number = 0

The Y coordinate of this node.

Accessors

fCost

  • get fCost(): number

Methods

compareTo

  • compareTo(item: Node): number

hash

  • hash(): string

Generated using TypeDoc