NodeTouchDispatcher

hi, guys,

I’ve made a class NodeTouchDispatcher for cocos2d-x 2.x, it will sort touch handlers base on their zorder instead of priority.

requirement:
1.NodeTouchDispatcher will assume all touch delegates are inherited from ccnode.
2.make CCTouchDispatcher::setPriority and CCTouchDispatcher::forceAddHandler virtual functions.

usage:

  1. add NodeTouchDispatcher.h and NodeTouchDispatcher.cpp to your project.
  2. new an instance of NodeTouchDispatcher to CCDirector::setTouchDispatcher.

you can check out the demo at https://github.com/sophiepeithos/NodeTouchDispatcher