Skip to content
/ HxFSM Public

Simple FSM for Haxe. Contains example OpenFL project using CallbackIntegration, but is made to be framework independent. Included is a CommandIntegration for use with mmvc.

Notifications You must be signed in to change notification settings

lbergman/HxFSM

Repository files navigation

HxFSM

Simple FSM for Haxe. Contains example OpenFL project using CallbackIntegration, but is made to be framework independent. Included is a CommandIntegration for use with mmvc.

Usage:

// Setup FSM with CallbackIntegration
var fsm:FSM = new FSM(new CallbackIntegration());
var fsmController:FSMController = new FSMController(fsm);

// Add states with transitions
// For example, InitState can go to WelcomeState or ErrorState.
fsm.add(InitState, [WelcomeState, ErrorState]);

// Access the fsmController to make transitions or query current state name
fsmController.goto(InitState);
fsmController.goto(WelcomeState);
trace("Current state:"+fsmController.currentStateName);

About

Simple FSM for Haxe. Contains example OpenFL project using CallbackIntegration, but is made to be framework independent. Included is a CommandIntegration for use with mmvc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages