Lua消息处理集合

来源:互联网 发布:软件立项申请表 编辑:程序博客网 时间:2024/06/05 07:32
function PostNotification( msg, arg )if arg thenif type(arg) == "number" thenarg = CCInteger:create(arg)endCCNotificationCenter:sharedNotificationCenter():postNotification( msg, arg );elseCCNotificationCenter:sharedNotificationCenter():postNotification( msg );endendfunction RegisterNotification( target, f, msg )CCNotificationCenter:sharedNotificationCenter():registerScriptObserver( target, f, msg );endfunction RemoveNotification( target, msg )CCNotificationCenter:sharedNotificationCenter():unregisterScriptObserver( target, msg );end

0 0
原创粉丝点击