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
Post a Comment