Phaser.Plugin.AStar.AStarNode

new AStarNode(x, y, isWalkable)

AStarNode is an object that stores AStar value. Each tile have an AStarNode in their properties

Parameters:

Name

Type

Description

x

number

The x coordinate of the tile.

y

number

The y coordinate of the tile.

isWalkable

boolean

Is this tile is walkable?

Source - out/plugins/AStar/AStar.js, line 494

Members

f:number

The weight. Sum of g + h.

Source - out/plugins/AStar/AStar.js, line 520

g:number

The total travel cost from the start point. Sum of COST_ORTHOGONAL and COST_DIAGONAL

Source - out/plugins/AStar/AStar.js, line 510

h:number

The remaing distance as the crow flies between this node and the goal.

Source - out/plugins/AStar/AStar.js, line 515

parent:Phaser.Plugin.AStar.AStarNode

Where do we come from? It's an AStarNode reference needed to reconstruct a path backwards (from goal to start point)

Source - out/plugins/AStar/AStar.js, line 525

travelCost:number

The cost to travel to this node, COST_ORTHOGONAL or COST_DIAGONAL

Source - out/plugins/AStar/AStar.js, line 535

walkable:boolean

Is this node is walkable?

Source - out/plugins/AStar/AStar.js, line 530

x:number

The x coordinate of the tile.

Source - out/plugins/AStar/AStar.js, line 500

y:number

The y coordinate of the tile.

Source - out/plugins/AStar/AStar.js, line 505