I'm using ccTouchesBegan/ccTouchesEnded to move sprite from one point to another but I'm having problem, if i give two or more consecutive inputs one by one while sprite is moving(runAction is being performed). It first moves to last point i touched and then teleports itself to previous touched points one by one.
2 Answers
It does it because you are running two actions at the same time. Before making the sprite take an action just make it stop current/all actions he's doing.
-
\$\begingroup\$ What's the difference between CCTouchBegan and CCTouchesBegan? \$\endgroup\$– 2600thMar 21, 2012 at 11:47
-
\$\begingroup\$ I don't rwally know but I would say Touches tracks multitap? Look at the function methods and you will know. \$\endgroup\$ Mar 21, 2012 at 12:01
-
\$\begingroup\$ @Beast one only invokes when working with multi-touch, and one will invoke with both single touch an multi-touch. \$\endgroup\$– Ali1S232Mar 21, 2012 at 13:39
-