<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">Cocos2d-x 详细事件分发机制推荐看</span><a target=_blank href="http://www.cnblogs.com/haogj/p/3784896.html" style="font-family: Arial, Helvetica, sans-serif;">http://www.cnblogs.com/haogj/p/3784896.html</a>
简单区分几种EventListener和_eventDispatcher添加监听时的区别。
监听器分为:
EventListenerTouch 触摸监听
EventListenerKeyboard 键盘监听
EventListenerMouse 鼠标监听
EventListenerCustom 自定义监听
EventListenerAcceleration 加速计监听
前三种是系统自带的事件类型(由系统触发) 后两种是用户设置的事件类型(人为触发)
一个操作可以触发多个事件
_eventDispatcher->addEventListenerWithSceneGraphPriority(cocos2d::EventListener *listener, cocos2d::Node *node);
_eventDispatcher->addEventListenerWithFixedPriority(cocos2d::EventListener *listener, int fixedPriority);