Skip to content

Instantly share code, notes, and snippets.

@erinlin
Last active December 19, 2015 07:09
Show Gist options
  • Save erinlin/5916887 to your computer and use it in GitHub Desktop.
Save erinlin/5916887 to your computer and use it in GitHub Desktop.
statemachine-example02
local sm = require("statemachine")
local process = sm.new(function(self, time)
local txt = display.newText( "Press Me", display.contentCenterX, display.contentCenterY, native.systemFont, 32)
txt:addEventListener("touch", function(evt)
self:continue()
end)
self:waiting()
txt.text = "Hello!"
end)
process:run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment