i am new to android cocos2d,i have created a game using player1 and player2 CCSprites n later in order to move player1 and player2 to sprite positions,its become complicated.please provide me required docment or solution.
Asked
Active
Viewed 135 times
0
-
[cocos2d document](http://www.cocos2d-x.org/wiki/Reference),[cocos2d tutorial stackoverflow link](http://stackoverflow.com/questions/10711047/the-completest-cocos2d-x-tutorial-guide-list) – einverne Oct 16 '13 at 12:12
1 Answers
1
You have to use move to actions for moving sprite and then run that actions on your player
CCMoveTo moveTo = CCMoveTo.action(0.5f, CGPoint.ccp(x, y));
mPlayer1.runAction(moveTo);
where x and y are the points where you want to move your sprite and 0.ff is time interval to complete that Action.

Rishabh Bhardwaj
- 832
- 8
- 20