pathfinding-state-machine
v0.0.1
Published
pathfinding result oriented state machine
Downloads
2
Readme
自动寻路的状态机
用transition指明初始状态, 目的状态和对应的动作(action, 支持异步), 多个transtion形成图(graph), 可指定任意状态,用最短路径算法找出路径, 到达指定状态。
API
props
- context
- allStates
Methods
- getState
- canGoto
- gotoState(go)
- go
- getChart
生命周期
Task
- taskStart
- taskChange
- taskError
- taskEnd
Action
- beforeAction
- before
- afterAction
- after
- actionError
State
- enterState
- enter