[Solved] swipe and jump effects in iphone gaming with cocos2d and box2d [closed]

You’ll want to look at UISwipeGestureRecognizer. For help with getting swipe gesture recognizers working with Cocos2D, look here. The short rundown is this: Set up your gesture recognizer (direction, number, selector/target). Attach gesture recognizer to the glView Set up event to fire when a swipe is detected. This is where you’ll do the jump up/down … Read more

[Solved] Why the float variable is always 0 even though i have changed its value [closed]

I figure out the reason finally:It is because of the GameLayer instance A that used to register the PanGestureRecognizer and the GameLayer instance B which used to show the screen is not same instance.Such that processPanGesture() function is just change instance A’s currentPer,While what i print is instance B’s currentPe solved Why the float variable … Read more