mirror of https://github.com/axmolengine/axmol.git
[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:
parent
7729756d04
commit
cf66992b51
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue