Skip to content

Instantly share code, notes, and snippets.

@ThomasWitte
Created October 20, 2015 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasWitte/6b314844a43547201ee8 to your computer and use it in GitHub Desktop.
Save ThomasWitte/6b314844a43547201ee8 to your computer and use it in GitHub Desktop.
require('lovetoys/lovetoys')
TestEvt = class('TestEvt')
em = EventManager()
em:addListener('TestEvt', class('Listener1'),
function() print('listener1') end)
em:addListener('TestEvt', class('Listener2'),
function() print('listener2') end)
em:fireEvent(TestEvt())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment