Platformer3DFSM
@zylem/game-lib / behavior / Platformer3DFSM
Class: Platformer3DFSM
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:161
Platformer 3D FSM
Constructors
Constructor
new Platformer3DFSM(
ctx):Platformer3DFSM
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:164
Parameters
ctx
Returns
Platformer3DFSM
Properties
machine
machine:
SyncStateMachine<Platformer3DState,Platformer3DEvent,never>
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:163
Methods
dispatch()
dispatch(
event):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:172
Dispatch an event to the FSM
Parameters
event
Returns
void
getJumpCount()
getJumpCount():
number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:180
Get current jump count from context
Returns
number
getState()
getState():
Platformer3DState
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:168
Get the current state
Returns
handleCollision()
handleCollision(
ctx):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:184
Handle collision event to update ground state
Parameters
ctx
Returns
void
isGrounded()
isGrounded():
boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:176
Check if grounded
Returns
boolean
update()
update(
input,state):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/platformer-3d.d.ts:188
Update FSM based on current state
Parameters
input
state
Returns
void