cocos2d iphone - need help to create following motion -



cocos2d iphone - need help to create following motion -

i want create next motion using moveto or moveby methods of cocos2d

when touch object should move there.is possible in cocos2d?

(void)cctouchesbegan:(nsset *)touches withevent:(uievent *)event{

for( uitouch *touch in touches ) {

cgpoint location = [touch locationinview: [touch view]]; location = [[ccdirector shareddirector] converttogl: location];

//while creating sprite set sprite.tag=2;

ccsprite *spr=[self getchildbytag:2];//use sprite tag while creating id move = [ccmoveby actionwithduration:4 position:location]; [spr runaction:move];

cocos2d-iphone

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -