KDvoid TestMultiTouch::ccTouchesMoved ( CCSet* pTouches, CCEvent* pEvent ) { for ( CCSetIterator iter = pTouches->begin ( ); iter != pTouches->end ( ); iter++ ) { CCTouch* pTouch = (CCTouch*) ( *iter ); TouchPoint* pTouchPoint = (TouchPoint*) m_tDictionary.objectForKey ( pTouch->getID ( ) ); pTouchPoint->setTouchPos ( this->convertTouchToNodeSpace ( pTouch ) ); } }
void MutiTouchTestLayer::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) { CCSetIterator iter = pTouches->begin(); for (; iter != pTouches->end(); iter++) { CCTouch* pTouch = (CCTouch*)(*iter); TouchPoint* pTP = (TouchPoint*)s_dic.objectForKey(pTouch->getID()); CCPoint location = pTouch->getLocation(); pTP->setTouchPos(location); } }
void MutiTouchTestLayer::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) { CCSetIterator iter = pTouches->begin(); for (; iter != pTouches->end(); iter++) { CCTouch* pTouch = (CCTouch*)(*iter); TouchPoint* pTP = (TouchPoint*)s_dic.objectForKey(pTouch->getID()); CCPoint location = pTouch->locationInView(); location = CCDirector::sharedDirector()->convertToGL(location); pTP->setTouchPos(location); } }
KDvoid TestMultiTouch::ccTouchesBegan ( CCSet* pTouches, CCEvent* pEvent ) { for ( CCSetIterator iter = pTouches->begin ( ); iter != pTouches->end ( ); iter++ ) { CCTouch* pTouch = (CCTouch*) ( *iter ); TouchPoint* pTouchPoint = TouchPoint::create ( this ); pTouchPoint->setTouchPos ( this->convertTouchToNodeSpace ( pTouch ) ); pTouchPoint->setTouchColor ( l_aTouchColors [ pTouch->getID ( ) ]); this->addChild ( pTouchPoint ); m_tDictionary.setObject ( pTouchPoint, pTouch->getID ( ) ); } }
void MutiTouchTestLayer::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent) { CCSetIterator iter = pTouches->begin(); for (; iter != pTouches->end(); iter++) { CCTouch* pTouch = (CCTouch*)(*iter); TouchPoint* pTouchPoint = TouchPoint::touchPointWithParent(this); CCPoint location = pTouch->getLocation(); pTouchPoint->setTouchPos(location); pTouchPoint->setTouchColor(s_TouchColors[pTouch->getID()]); addChild(pTouchPoint); s_dic.setObject(pTouchPoint, pTouch->getID()); } }