Skip to content

useMovementPathState

useMovementPathState(entity): { cost: number; destinationKey: string; nextIndex: number; pathKeys: string[]; reason: string | undefined; spentCost: number; status: GameboardMovementStatus; visited: number; } | undefined

Defined in: src/react/react.ts:915

Read current path-following state for one moving placement.

Entity | null | undefined

{ cost: number; destinationKey: string; nextIndex: number; pathKeys: string[]; reason: string | undefined; spentCost: number; status: GameboardMovementStatus; visited: number; }

cost: number = 0

Total planned path cost.

destinationKey: string = ''

Destination tile key for the current request.

nextIndex: number = 0

Next path index to advance to.

pathKeys: string[]

Planned path tile keys.

reason: string | undefined

Blocked or out-of-range reason.

spentCost: number = 0

Cost spent so far.

status: GameboardMovementStatus

Current movement status.

visited: number = 0

Number of pathfinder nodes visited for the request.


undefined