Constructor
new PathFinderNode(x, y)
| Name | Type | Description |
|---|---|---|
x | number | Tile x |
y | number | Tile y |
- Source
Members
cost
Properties| Type | Description |
|---|---|
| number | Extra cost added to A* G-score for stepping on this cell |
- Source
f
Properties| Type | Description |
|---|---|
| number | A* F-score: G + heuristic |
- Source
g
Properties| Type | Description |
|---|---|
| number | A* G-score: actual cost from start to this node |
- Source
h
Properties| Type | Description |
|---|---|
| number | A* heuristic: the estimated cost left to the goal, breaks ties between equal F |
- Source
heapIndex
Properties| Type | Description |
|---|---|
| number | Where it is in the A* open list's heap, while open |
- Source
isClosed
Properties| Type | Description |
|---|---|
| boolean | In the A* closed list |
- Source
isOpen
Properties| Type | Description |
|---|---|
| boolean | In the A* open list |
- Source
parent :PathFinderNode|null
- PathFinderNode |
null
| Type | Description |
|---|---|
| PathFinderNode | | Parent for path reconstruction |
- Source
pos
Properties| Type | Description |
|---|---|
| Vector2 | Tile coords (integer) |
- Source
posWorld
Properties| Type | Description |
|---|---|
| Vector2 | World-space center of this tile (set by buildNodeData) |
- Source
walkable
Properties| Type | Description |
|---|---|
| boolean | True if this cell is passable (set by buildNodeData) |
- Source
Methods
isClear()
True if walkable and not blocked by cost.
- Source
reset()
Reset per-search state and walkability (called by buildNodeData).
- Source
resetSearch()
Clear what a search left on this node, keeping walkable and cost
- Source