Hello all. Sorry to bother you guys again, each time I find solution for something then I get stuck again because I have another problem.
Yesterday I was having problem to put different instance of a Custom CCLayer in the scene and move them independently, I followed the example in the cocos2d project and I had to subclass CCSprite and implement the CCTargetedDelegate methods. I did so, and I can drag from a "box" as many matches sprites as I want to the scene, and move the one I click on. Now I need to rotate the instance of my sprite I put my two fingers to execute the action.
I thought that if I register self (Instance of my custom Sprite) as a standard touch delegate and implement its methods, then on the moved method add a check to see if I have 1 UITouch coming form the set to move or 2 to rotate it would work. But it doesn't do it.
I can move fine, but when I try to move a second instance to the scene I end up moving them together, and even happens to me what happened yesterday that even if I touch outside the sprite the method its called, I know this is because the TouchDispatcher get any touch on the device and send the message to the targeted class, what I don't know is what can I do to rotate/move the one I have under my finger?
Im thinking in having an array with all the custom sprites and check for each one if the touch is inside it and if so rotate.. But I don'n like that idea too much.
Please any help I will appreciate it a lot.
Thanks
Gustavo