程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> cocos2d-x觸摸分發器原理

cocos2d-x觸摸分發器原理

編輯:C++入門知識

 

 

 

 
       ccTouchesBegan(CCSet *pTouches, CCEvent *  ccTouchesMoved(CCSet *pTouches, CCEvent *  ccTouchesEnded(CCSet *pTouches, CCEvent *  ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) 

 

 TouchLayer::ccTouchesMoved(CCSet *pTouches, CCEvent *(pTouches->count() == *touch = dynamic_cast<CCTouch*>(pTouches->        
        CCPoint position = touch->
        position = CCDirector::sharedDirector()->
        

 

 CCLayer::setTouchEnabled( (m_bTouchEnabled !==->->getTouchDispatcher()->removeDelegate(

pDispatcher->addStandardDelegate(this, 0)方法,也就是將該對象注冊為標准代理。

 

    
      ccTouchBegan(CCTouch *pTouch, CCEvent *
      ccTouchMoved(CCTouch *pTouch, CCEvent *  ccTouchEnded(CCTouch *pTouch, CCEvent *  ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) 

 

 

 

    
     addStandardDelegate(CCTouchDelegate *pDelegate, 
     addTargetedDelegate(CCTouchDelegate *pDelegate,  nPriority, 
     removeDelegate(CCTouchDelegate * removeAllDelegates(
     setPriority( nPriority, CCTouchDelegate *
     touches(CCSet *pTouches, CCEvent *pEvent, unsigned * m_pTargetedHandlers;  
     CCArray* m_pStandardHandlers;  

 

 CCTouchDispatcher::touches(CCSet *pTouches, CCEvent *pEvent, unsigned 
     (uTargetedHandlersCount > *
         (setIter = pTouches->begin(); setIter != pTouches->end(); ++= (CCTouch *)(**pHandler =* pObj =
= (CCTargetedTouchHandler * (! bClaimed = 
                 (uIndex === pHandler->getDelegate()->->getClaimedTouches()->
                 (pHandler->getClaimedTouches()->
                    bClaimed = ->getDelegate()->->getDelegate()->->getClaimedTouches()->->getDelegate()->->getClaimedTouches()->
                 (bClaimed && pHandler->->
     (uStandardHandlersCount >  && pMutableTouches->count() > *pHandler =* pObj =
= (CCStandardTouchHandler* (!->getDelegate()->->getDelegate()->->getDelegate()->->getDelegate()->

 

 

 

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved