Last active
December 19, 2015 07:09
-
-
Save erinlin/5916887 to your computer and use it in GitHub Desktop.
statemachine-example02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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