title: Animating a CCSprite on cocos2d?
body: <p>Hey guys, I'm new to cocos2d and iPhone development, im currently trying to create a game like "PapiJump",
  What I'm currently having problems with, is animating the character CCSprite in my game, 
  I have created 3 images of my character, character pointing right, left and middle (http://i53.tinypic.com/ngzoyh.png)</p>
  
  <p>so when the character changes its direction (left or right), it wont "jump" directly to the other direction but will animate..</p>
  
  <p>In my code im using the TouchesEnded method, in this method im setting a variable named "touchState",
  so if the user touched the right side of the screen it will set "touchState" to 1, otherwise it sets it to 2 (means left).</p>
  
  <p>then in the "init" method i created a "schedule" that runs another method every 0.5 sec that is named: "updateGame",
  the "updateGame" method updates the player's position, it works like that:
  player.position = ccp(player.position.x , player.position.y - playerGravity.y);</p>
  
  <p>I've read <a href="http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d" rel="nofollow">Ray's tutorial</a> on animating CCSprites but i have no idea how to achieve the result that i need..
  Thanks in advance and sorry for my bad english!</p>