public void addTargetedDelegate(ICCTargetedTouchDelegate pDelegate, int nPriority, bool bSwallowsTouches) { CCTouchHandler cCTouchHandler = CCTargetedTouchHandler.handlerWithDelegate(pDelegate, nPriority, bSwallowsTouches); if (!this.m_bLocked) { this.forceAddHandler(cCTouchHandler, this.m_pTargetedHandlers); return; } this.m_pHandlersToAdd.Add(cCTouchHandler); this.m_bToAdd = true; }
/// <summary> /// Adds a targeted touch delegate to the dispatcher's list. /// See TargetedTouchDelegate description. /// IMPORTANT: The delegate will be retained. /// </summary> public void addTargetedDelegate(ICCTargetedTouchDelegate pDelegate, int nPriority, bool bSwallowsTouches) { CCTouchHandler pHandler = CCTargetedTouchHandler.handlerWithDelegate(pDelegate, nPriority, bSwallowsTouches); if (!m_bLocked) { forceAddHandler(pHandler, m_pTargetedHandlers); } else { m_pHandlersToAdd.Add(pHandler); m_bToAdd = true; } }