/// <summary> /// singleton of the CCTouchDispatcher /// </summary> public static CCTouchDispatcher sharedDispatcher() { // synchronized ?? if (pSharedDispatcher == null) { pSharedDispatcher = new CCTouchDispatcher(); pSharedDispatcher.init(); } return(pSharedDispatcher); }
public override void onExit() { if (m_bIsTouchEnabled) { CCTouchDispatcher.sharedDispatcher().removeDelegate(this); } // remove this layer from the delegates who concern Accelerometer Sensor if (m_bIsAccelerometerEnabled) { ///@todo throw new NotImplementedException(); } // remove this layer from the delegates who concern the kaypad msg if (m_bIsKeypadEnabled) { } base.onExit(); }
/// <summary> /// @todo /// </summary> //virtual void didAccelerate(CCAcceleration* pAccelerationValue) {CC_UNUSED_PARAM(pAccelerationValue);} /** If isTouchEnabled, this method is called onEnter. Override it to change the * way CCLayer receives touch events. * ( Default: CCTouchDispatcher::sharedDispatcher()->addStandardDelegate(this,0); ) * Example: * void CCLayer::registerWithTouchDispatcher() * { * CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this,INT_MIN+1,true); * } * @since v0.8.0 */ public virtual void registerWithTouchDispatcher() { ///@todo CCTouchDispatcher.sharedDispatcher().addStandardDelegate(this, 0); }