CallbacksInvoker Class
Extends _CallbacksHandler
Module: _decorator Parent Module: cc
The callbacks invoker to handle and invoke callbacks by key.
Index
Methods
invokeaddhasCheck if the specified key has any registered callback. If a callback is also specified, it will only return true if the callback is registered.removeAllRemoves all callbacks registered in a certain event type or all callbacks registered with a certain targetremove
Details
Methods
invoke
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/callbacks-invoker.js:229 |
Parameters
keyStringp1Anyp2Anyp3Anyp4Anyp5Any
add
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/callbacks-invoker.js:96 |
Parameters
has
Check if the specified key has any registered callback. If a callback is also specified, it will only return true if the callback is registered.
| meta | description |
|---|---|
| Returns | Boolean |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/callbacks-invoker.js:111 |
Parameters
removeAll
Removes all callbacks registered in a certain event type or all callbacks registered with a certain target
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/callbacks-invoker.js:147 |
Parameters
remove
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/callbacks-invoker.js:185 |