Daily Archives

Articles indexed Saturday October 6 2012

Page 13/14 | < Previous Page | 9 10 11 12 13 14  | Next Page >

  • Adding gesture recognizer (or dragging) to CCSprite

    - by user339946
    I'm trying to allow a CCSprite to be dragged across the screen. I've succeeded so far by doing it on a Layer level (from this tutorial). However, this only allows ONE sprite to be dragged at a time as the method implementation can only identify a single sprite to move at a time. I'd like to be able to perhaps add a gesture recognizer or somehow implement ccTouchesBegan/Moved in my own little CCSprite subclass. However, from what I understand, you can't just add gesture recognizers to CCSprites. ccTouchMoved are also not available on CCSprites?? Really confused as to how to implement touches on Cocos2D. What is the easiest way to add some position translation code to a CCSprite so it can be dragged around? Thanks!

    Read the article

< Previous Page | 9 10 11 12 13 14  | Next Page >