[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:

  1. Set up your gesture recognizer (direction, number, selector/target).
  2. Attach gesture recognizer to the glView
  3. Set up event to fire when a swipe is detected. This is where you’ll do the jump up/down stuff.
  4. Tear down the gesture recognizer when you no longer need it.

A side note, a little bit of research does wonders. All of this information is available with a quick google search.

2

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