# Class MessageEventData

批量注册、移除全局事件对象

#### Hierarchy

- MessageEventData

- Defined in assets/core/common/event/MessageManager.ts:13

#####
Index

### Constructors

constructor

### Properties

events

### Methods

clear
dispatchEvent
off
on

## Constructors

### constructor

- new MessageEventData(): MessageEventData

- #### Returns MessageEventData

## Properties

### `Private` events

events: Map<string, EventData[]> = ...

- Defined in assets/core/common/event/MessageManager.ts:14

## Methods

### clear

- clear(): void

- 清除所有的全局事件监听

  #### Returns void

  - Defined in assets/core/common/event/MessageManager.ts:61

### dispatchEvent

- dispatchEvent(event: string, ...args: any): void

- 触发全局事件

  #### Parameters

  - ##### event: string

  - ##### `Rest` ...args: any

  #### Returns void

  - Defined in assets/core/common/event/MessageManager.ts:56

### off

- off(event: string): void

- 移除全局事件 *

  #### Parameters

  - ##### event: string

    事件名

  #### Returns void

  - Defined in assets/core/common/event/MessageManager.ts:41

### on

- on(event: string, listener: ListenerFunc, object: object): void

- 注册全局事件

  #### Parameters

  - ##### event: string

    事件名

  - ##### listener: ListenerFunc

    处理事件的侦听器函数

  - ##### object: object

    侦听函数绑定的作用域对象

  #### Returns void

  - Defined in assets/core/common/event/MessageManager.ts:22

Generated using TypeDoc