Skip to main content

CCTouchDispatcher

CCTouchDispatcher

Cocos2D

Inheritance: System.Object

Implements: Cocos2D.ICCEGLTouchDelegate

Constructors

CCTouchDispatcher()

CCTouchDispatcher()()

Fields

m_pStandardHandlers(System.Collections.Generic.ListCocos2D.CCTouchHandler)
m_pTargetedHandlers(System.Collections.Generic.ListCocos2D.CCTouchHandler)

Properties

IsDispatchEvents(System.Boolean)

Whether or not the events are going to be dispatched. Default: true

Methods

AddStandardDelegate(ICCStandardTouchDelegate)

AddStandardDelegate(ICCStandardTouchDelegate)(Cocos2D.ICCStandardTouchDelegate pDelegate)
Parameters:
pDelegate (Cocos2D.ICCStandardTouchDelegate)

AddStandardDelegate(ICCStandardTouchDelegate, int)

AddStandardDelegate(ICCStandardTouchDelegate, int)(Cocos2D.ICCStandardTouchDelegate pDelegate, System.Int32 nPriority)

Adds a standard touch delegate to the dispatcher's list. See StandardTouchDelegate description. IMPORTANT: The delegate will be retained.

Parameters:
pDelegate (Cocos2D.ICCStandardTouchDelegate)
nPriority (System.Int32)
Example

AddTargetedDelegate(ICCTargetedTouchDelegate)

AddTargetedDelegate(ICCTargetedTouchDelegate)(Cocos2D.ICCTargetedTouchDelegate pDelegate)
Parameters:
pDelegate (Cocos2D.ICCTargetedTouchDelegate)

AddTargetedDelegate(ICCTargetedTouchDelegate, bool)

AddTargetedDelegate(ICCTargetedTouchDelegate, bool)(Cocos2D.ICCTargetedTouchDelegate pDelegate, System.Boolean bConsumesTouches)
Parameters:
pDelegate (Cocos2D.ICCTargetedTouchDelegate)
bConsumesTouches (System.Boolean)

AddTargetedDelegate(ICCTargetedTouchDelegate, int, bool)

AddTargetedDelegate(ICCTargetedTouchDelegate, int, bool)(Cocos2D.ICCTargetedTouchDelegate pDelegate, System.Int32 nPriority, System.Boolean bConsumesTouches)

Adds a targeted touch delegate to the dispatcher's list. See TargetedTouchDelegate description. IMPORTANT: The delegate will be retained.

Parameters:
pDelegate (Cocos2D.ICCTargetedTouchDelegate)
nPriority (System.Int32)
bConsumesTouches (System.Boolean)
Example

FindHandler(ICCTouchDelegate)

Cocos2D.CCTouchHandler FindHandler(ICCTouchDelegate)(Cocos2D.ICCTouchDelegate pDelegate)
Parameters:
pDelegate (Cocos2D.ICCTouchDelegate)
Returns:
Cocos2D.CCTouchHandler

ForceAddHandler(CCTouchHandler, List)

ForceAddHandler(CCTouchHandler, List)(Cocos2D.CCTouchHandler pHandler, System.Collections.Generic.ListCocos2D.CCTouchHandler pArray)
Parameters:
pHandler (Cocos2D.CCTouchHandler)
pArray (System.Collections.Generic.ListCocos2D.CCTouchHandler)

ForceRemoveAllDelegates()

ForceRemoveAllDelegates()()

ForceRemoveDelegate(ICCTouchDelegate)

ForceRemoveDelegate(ICCTouchDelegate)(Cocos2D.ICCTouchDelegate pDelegate)
Parameters:
pDelegate (Cocos2D.ICCTouchDelegate)

Init()

System.Boolean Init()()
Returns:
System.Boolean

RearrangeAllHandlersUponTouch()

RearrangeAllHandlersUponTouch()()

RearrangeHandlers(List)

RearrangeHandlers(List)(System.Collections.Generic.ListCocos2D.CCTouchHandler pArray)
Parameters:
pArray (System.Collections.Generic.ListCocos2D.CCTouchHandler)

RemoveAllDelegates()

RemoveAllDelegates()()

Removes all touch delegates, releasing all the delegates

Example

RemoveDelegate(ICCTouchDelegate)

RemoveDelegate(ICCTouchDelegate)(Cocos2D.ICCTouchDelegate pDelegate)

Removes a touch delegate. The delegate will be released

Parameters:
pDelegate (Cocos2D.ICCTouchDelegate)
Example

SetPriority(int, ICCTouchDelegate)

SetPriority(int, ICCTouchDelegate)(System.Int32 nPriority, Cocos2D.ICCTouchDelegate pDelegate)

Changes the priority of a previously added delegate. The lower the number, the higher the priority

Parameters:
nPriority (System.Int32)
pDelegate (Cocos2D.ICCTouchDelegate)
Example

Touches(List, CCTouchType)

Touches(List, CCTouchType)(System.Collections.Generic.ListCocos2D.CCTouch pTouches, Cocos2D.CCTouchType touchType)
Parameters:
pTouches (System.Collections.Generic.ListCocos2D.CCTouch)
touchType (Cocos2D.CCTouchType)

TouchesBegan(List)

TouchesBegan(List)(System.Collections.Generic.ListCocos2D.CCTouch touches)
Parameters:
touches (System.Collections.Generic.ListCocos2D.CCTouch)
Example

TouchesCancelled(List)

TouchesCancelled(List)(System.Collections.Generic.ListCocos2D.CCTouch touches)
Parameters:
touches (System.Collections.Generic.ListCocos2D.CCTouch)
Example

TouchesEnded(List)

TouchesEnded(List)(System.Collections.Generic.ListCocos2D.CCTouch touches)
Parameters:
touches (System.Collections.Generic.ListCocos2D.CCTouch)
Example

TouchesMoved(List)

TouchesMoved(List)(System.Collections.Generic.ListCocos2D.CCTouch touches)
Parameters:
touches (System.Collections.Generic.ListCocos2D.CCTouch)
Example

UpdateGraphPriority(ICCTouchDelegate)

UpdateGraphPriority(ICCTouchDelegate)(Cocos2D.ICCTouchDelegate d)

Use this to update the priority of the given delegate when its graph priority changes due to a parenting change.

Parameters:
d (Cocos2D.ICCTouchDelegate)
Example