Thanks!
this->setIsTouchEnabled(true);
and change your methods to
void HelloWorld::ccTouchesBegan( CCSet *pTouches, CCEvent *pEvent )
{
CCSetIterator it = pTouches->begin();
CCPoint pt;
CCTouch* touch;
for( int iTouchCount = 0; iTouchCount < pTouches->count(); iTouchCount++ )
{
touch = (CCTouch*)(*it);
pt = touch->locationInView( touch->view() );
it++;
}
}
void HelloWorld::ccTouchesMoved( CCSet *pTouches, CCEvent *pEvent )
{
CCSetIterator it = pTouches->begin();
CCPoint pt;
CCTouch* touch;
for( int iTouchCount = 0; iTouchCount < pTouches->count(); iTouchCount++ )
{
touch = (CCTouch*)(*it);
pt = touch->locationInView( touch->view() );
it++;
}
}
void HelloWorld::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent )
{
CCSetIterator it = pTouches->begin();
CCPoint pt;
CCTouch* touch;
for( int iTouchCount = 0; iTouchCount < pTouches->count(); iTouchCount++ )
{
touch = (CCTouch*)(*it);
pt = touch->locationInView( touch->view() );
it++;
}
}
every iteration in the for loops is a different finger pressed at the time
to know which finger pressed the screen use the touch pointer