Class cc.KeyboardDispatcher
Extends
cc.Class.
Defined in: CCKeyboardDispatcher.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Dispatch the keyboard message
|
Method Attributes | Method Name and Description |
---|---|
addDelegate(delegate)
add delegate to concern keyboard msg
|
|
dispatchKeyboardMSG(e, keydown)
dispatch the keyboard message to the delegates
|
|
forceAddDelegate(delegate)
force add the delegate
|
|
forceRemoveDelegate(delegate)
force remove the delegate
|
|
<static> |
cc.KeyboardDispatcher.getInstance()
Returns the shared cc.KeyboardDispatcher object for the system.
|
<static> |
cc.KeyboardDispatcher.purgeSharedDispatcher()
Release the shared cc.KeyboardDispatcher object from the system.
|
removeDelegate(delegate)
remove the delegate from the delegates who concern keyboard msg
|
Method Detail
addDelegate(delegate)
add delegate to concern keyboard msg
- Parameters:
- {cc.KeyboardDelegate} delegate
- keyboard delegate object
{Boolean}
dispatchKeyboardMSG(e, keydown)
dispatch the keyboard message to the delegates
- Parameters:
- {event} e
- {Boolean} keydown
- whether this is a keydown or keyup
- Returns:
- {Boolean}
forceAddDelegate(delegate)
force add the delegate
- Parameters:
- {cc.KeyboardDelegate} delegate
forceRemoveDelegate(delegate)
force remove the delegate
- Parameters:
- {cc.KeyboardDelegate} delegate
<static>
{cc.keyboardDispatcher}
cc.KeyboardDispatcher.getInstance()
Returns the shared cc.KeyboardDispatcher object for the system.
- Returns:
- {cc.keyboardDispatcher}
<static>
cc.KeyboardDispatcher.purgeSharedDispatcher()
Release the shared cc.KeyboardDispatcher object from the system.
removeDelegate(delegate)
remove the delegate from the delegates who concern keyboard msg
- Parameters:
- {cc.KeyboardDelegate} delegate