I’m handling the touches manualy through a class that holds every touchable sprite. Also, every menu is a CCLayer, and when I change from one menu to the other, I use the CCTransition### and get the new scene.
So, the layers are “still there” and when I touch one menu, the previous layer also receive it… like when I start the game in a new CCLayer, and then the menus are still affected for the multi touch…
If I use single touch, I can swallow the touches, but the game must have multi touch…
What can I do? Thank you all!
You need to consume the touch event in whatever layer needs it. After a layer consumes it, the touch will no longer be propagated to “previous” layers.
http://www.cocos2d-iphone.org/api-ref/0.9.0-beta/_c_c_touch_delegate_protocol_8h_source.html
To consume a touch event, you return YES in the
ccTouchBegandelegate method.EDIT: changed method name to match
CCStandardTouchDelegate