Extends
Methods
# fire(type, params)
执行事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
params |
Object
|
事件携带参数 |
- Overrides:
# off(type, callback, context) → {function}
取消事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型,请参考SceneEventType |
callback |
function
|
回调函数 |
context |
Context
|
上下文 |
- Overrides:
- See:
- 取消回调
function
# on(type, callback, context) → {function}
事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型,请参考SceneEventType |
callback |
function
|
回调函数 |
context |
Context
|
上下文 |
- Overrides:
- See:
- 注册回调
function
# once(type, fn, context)
订阅一次事件
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string
|
事件类型 |
fn |
function
|
事件回调 |
context |
Context
|
生效范围 |
- Overrides: