Skip to content

lua state machine taking advantage of first class functions. Made this while reading a book on oop in lua.

Notifications You must be signed in to change notification settings

jake100/lua-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

lua-state-machine

lua state machine taking advantage of first class functions.

example

dofile("statemachine.lua")

sm = stateManager:new(true)

firstState = state:new("first state", {function () print("first") sm.nextState() end})

secondState = state:new("first state", {function () print("second") sm.stop() end})

sm.add(firstState)

sm.add(secondState)

sm.run()

About

lua state machine taking advantage of first class functions. Made this while reading a book on oop in lua.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages