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.
Parameters
Section titled “Parameters”entity
Section titled “entity”Entity | null | undefined
Returns
Section titled “Returns”Type Literal
Section titled “Type Literal”{ 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
Section titled “destinationKey”destinationKey:
string=''
Destination tile key for the current request.
nextIndex
Section titled “nextIndex”nextIndex:
number=0
Next path index to advance to.
pathKeys
Section titled “pathKeys”pathKeys:
string[]
Planned path tile keys.
reason
Section titled “reason”reason:
string|undefined
Blocked or out-of-range reason.
spentCost
Section titled “spentCost”spentCost:
number=0
Cost spent so far.
status
Section titled “status”status:
GameboardMovementStatus
Current movement status.
visited
Section titled “visited”visited:
number=0
Number of pathfinder nodes visited for the request.
undefined