public void addTargetedDelegate(CCTouchOneByOneDelegate aDelegate, int priority, bool swallowsTouches) { CCTouchHandler handler = new CCTargetedTouchHandler(aDelegate, priority, swallowsTouches); if( ! locked ) { forceAddHandler(handler, targetedHandlers); } else { if(!removeDelegate(aDelegate, handlersToRemove)){ handlersToAdd.Add(handler); toAdd = true; } } } #endregion
/** Register with more priority than CCMenu's but don't swallow touches. */ protected override void registerWithTouchDispatcher() { CCTouchDispatcher dispatcher = CCDirector.sharedDirector.touchDispatcher; int priority = _touchPriority; dispatcher.addTargetedDelegate(this, priority, false); }