Skip to content

Instantly share code, notes, and snippets.

@etgryphon
Created November 23, 2011 09:13
Show Gist options
  • Save etgryphon/1388244 to your computer and use it in GitHub Desktop.
Save etgryphon/1388244 to your computer and use it in GitHub Desktop.
Yi = Stativus.createStatechart()
Yi.addState "StateA1",
globalConcurrentState:'default_states',
states: [
name: "StateA1B1",
substatesAreConcurrent: true,
states: [
name: "StateA1C1"
,
name: "StateA1C2"
]
,
name: "StateA1B2"
]
Yi.addState "StateA2",
globalConcurrentState:'modal_states',
states: [
name: "StateA2B1",
substatesAreConcurrent: true,
states: [
name: "StateA2C1"
,
name: "StateA2C2"
]
,
name: "StateA2B2"
]
Yi.initStates {'default_states': 'StateA1', 'modal_states': 'StateA2'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment