Hi All,
I've been learning Objective-C and Cocos2d for a month or so now and am working on a card game and have run into something I can't figure out.
In my game, the player has a series of cards (atlas sprite objects) face-down and needs to be able to select only two (any two) of the cards.
The player selects the first card and an animation plays where it flips over, the player then has to select the second card which then turns over. Where I'm having difficulty is I want to 'hold' the two cards being displayed for 3 seconds, and then return them to face down. This part works fine, but the player can keep touching cards and turning them all over. I need to find a way of disabling touches for that 3 seconds after the two cards have been selected. (In electronics, it's called 'debouncing a switch' - getting an event to happen on the first and only button push).
I've had a look at ccTouchesBegin/End etc and feel that the solution's in there somewhere but I just can't get my head around it.
Any hints or help would be greatly appreciated.
Thanks!