Class cc.KeyboardDispatcher
- Defined in: CCKeyboardDispatcher.js
- Extends cc.Class
Constructor Attributes | Constructor Name and Description |
---|---|
Dispatch the keyboard message
|
Method Summary
Class Detail
cc.KeyboardDispatcher()
Dispatch the keyboard message
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}
-
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