title: Best practices for handling touches to a CCSprite with cocos2d
body: <p>Hey all. I just started looking into the cocos2d library. I've heard that it's an easy library to get into if you're used to programming in ActionScript and I've found that a lot of the concepts are indeed similar.</p>
  
  <p>I started looking through sample projects (the sample games linked <a href="http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:sample_games" rel="noreferrer">here</a> were especially helpful) and I saw that handling of touches usually isn't done in a CCSprite. Rather, the CCLayer that instantiates CCSprites reacts to a touch event and iterates through the sprites it created to detect which CCSprite was touched (if any).</p>
  
  <p>I want CCSprites to handle whether they've been touched themselves, and call <em>up</em> to notify that it's been touched (if needed). The <code>Paddle</code> class found under /tests/TouchesTest does just this - it handles touches by itself.</p>
  
  <p>So, the question I have is: What's considered best practice for this? Is it better to have touches handled in a central location and iterate through children to see what's been touched? Or should each child handle its own touch events? Or does it not matter?</p>
  
  <p>I'd prefer each child handling its own touch events but I'd like to follow best practices on this (if they exist). Thanks!</p>