-- local _broadcast = {} local EventMsgCenter = {} EventMsgCenter.registerMsg = function(e, callback) if _broadcast[e] == nil then _broadcast[e] = {} end table.insert(_broadcast[e], callback) end EventMsgCenter.unRegisterMsg = function(e, callback) if _broadcast[e] == nil or callback == nil then return end table.remove(_broadcast[e], callback) end EventMsgCenter.unRegisterAllMsgByEvent = function(e) if _broadcast[e] == nil then return end end EventMsgCenter.unRegisterAllMsg = function() end EventMsgCenter.sendMsg = function(e, ...) end return EventMsgCenter