Skip to content

arayinfree/notificationCenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

notificationCenter

provides a mechanism for broadcasting information within a program buy lua

feature

  • easy to use
  • does not holding observer
  • remove/add observe in callback func safty

API

-- add observer for event with func. func prototype : func(self ,data ,obj)
function notificationCenter:addObserve(event,observer,func)

-- remove observer for specify event ,or if event == nil ,remove all event for observer
function notificationCenter:removeObserve(observer,event)

-- post event with data and obj. event required
function notificationCenter:post(event,data,obj)

usage

see test.lua

About

provides a mechanism for broadcasting information within a program buy lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages