Inherits from NSObject
Conforms to CCEventDelegate
Declared in CCEventDispatcher.h

Overview

CCEventDispatcher

This is object is responsible for dispatching the events:

- Mouse events
- Keyboard events
- Touch events

Only available on Mac

Tasks

Other Methods

Deprecated Methods

Properties

dispatchEvents

Class Methods

sharedDispatcher

Instance Methods

addGestureDelegate:priority:

Adds a gesture delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.

- (void)addGestureDelegate:(id<CCGestureEventDelegate>)delegate priority:(NSInteger)priority

Discussion

IMPORTANT: The delegate will be retained.

Declared In

CCEventDispatcher.h

addKeyboardDelegate:priority:

Adds a Keyboard delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.

- (void)addKeyboardDelegate:(id<CCKeyboardEventDelegate>)delegate priority:(NSInteger)priority

Discussion

IMPORTANT: The delegate will be retained.

Declared In

CCEventDispatcher.h

addMouseDelegate:priority:

Adds a mouse delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.

- (void)addMouseDelegate:(id<CCMouseEventDelegate>)delegate priority:(NSInteger)priority

Discussion

IMPORTANT: The delegate will be retained.

Declared In

CCEventDispatcher.h

addTouchDelegate:priority:

Adds a Touch delegate to the dispatcher’s list. Delegates with a lower priority value will be called before higher priority values. All the events will be propagated to all the delegates, unless the one delegate returns YES.

- (void)addTouchDelegate:(id<CCTouchEventDelegate>)delegate priority:(NSInteger)priority

Discussion

IMPORTANT: The delegate will be retained.

Declared In

CCEventDispatcher.h

dispatchEvent:

removeAllGestureDelegates

Removes all gesture delegates, releasing all the delegates

- (void)removeAllGestureDelegates

Declared In

CCEventDispatcher.h

removeAllKeyboardDelegates

Removes all mouse delegates, releasing all the delegates

- (void)removeAllKeyboardDelegates

Declared In

CCEventDispatcher.h

removeAllMouseDelegates

Removes all mouse delegates, releasing all the delegates

- (void)removeAllMouseDelegates

Declared In

CCEventDispatcher.h

removeAllTouchDelegates

Removes all touch delegates, releasing all the delegates

- (void)removeAllTouchDelegates

Declared In

CCEventDispatcher.h

removeGestureDelegate:

Removes a gesture delegate

- (void)removeGestureDelegate:(id)delegate

Declared In

CCEventDispatcher.h

removeKeyboardDelegate:

removes a mouse delegate

- (void)removeKeyboardDelegate:(id)delegate

Declared In

CCEventDispatcher.h

removeMouseDelegate:

removes a mouse delegate

- (void)removeMouseDelegate:(id)delegate

Declared In

CCEventDispatcher.h

removeTouchDelegate:

Removes a touch delegate

- (void)removeTouchDelegate:(id)delegate

Declared In

CCEventDispatcher.h