Skip to content

Instantly share code, notes, and snippets.

@balkhaev
Last active September 1, 2016 21:51
Show Gist options
  • Save balkhaev/1a9a0af9d4534b58a81f59f434b38bc2 to your computer and use it in GitHub Desktop.
Save balkhaev/1a9a0af9d4534b58a81f59f434b38bc2 to your computer and use it in GitHub Desktop.
const gameMachine = new StateMachine({
name: 'gameMachine',
type: 'specialized'
})
gameMachine.add({
details: [ renderDetail, controllerDetail, ],
components: [ playerComponent ]
})
gameMachine.on('render', function() {
console.log('render!')
})
console.log(gameMachine.getState())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment