objective c - Move Object to Touch - iPhone -


i have sprite in iphone game, how can make that sprite moves location of touch? needs transition there, not switch immediately. sprite ccsprite cocos2d.

hope can help, thanks.

assuming want implement using uikit's animation support (and sprite implemented view), 1 way of doing it.

  • on touch event, location of touch, , based on current location of sprite, determine how long take sprite there

  • inside animation block, change frame of sprite view touch location, , specify duration , other options want.

apple's 'view programming guide' explains need know take approach.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -