[dispatcher] Updating HelloWorldScene.cpp, if you wish to using the same listener for different target, please invoke clone to create a new one.

This commit is contained in:
James Chen 2013-09-13 18:02:26 +08:00
parent 7729756d04
commit cf66992b51
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ bool HelloWorld::init()
int layerTouchId = dispatcher->registerEventListenerWithSceneGraphPriority(layerTouchListener, this);
int layerTouchId2 = dispatcher->registerEventListenerWithSceneGraphPriority(layerTouchListener, this);
int layerTouchId2 = dispatcher->registerEventListenerWithSceneGraphPriority(layerTouchListener->clone(), this);
auto spriteTouchListener = TouchEventListener::create(Touch::DispatchMode::ONE_BY_ONE);
spriteTouchListener->setSwallowTouches(true);