Class: CEvent
所有事件类的基类
Hierarchy
CEvent
↳
KeyEvent
Properties
- target
- currentTarget
- type
- data
- param
- time
- delay
- mouseCode
- ctrlKey
- altKey
- shiftKey
- targetTouches
- changedTouches
- touches
Constructors
Methods
Accessors
Properties
target
• target: Object3D
事件目标。 一般为注册事件的对象本身。
Defined in
currentTarget
• currentTarget: CEventListener
事件当前目标。 一般为注册事件的对象本身。
Defined in
type
• type: string
引擎中的事件的类型标识字符串
Defined in
data
• data: any
附加数据。 例如,保存QueueLoader加载后的原始数据,加载完毕后,作为参数传出。
Defined in
param
• param: any
注册事件时传递的参数
Defined in
time
• time: number
= 0
当前时间戳。
Defined in
delay
• delay: number
= 0
每帧间隔延时。
Defined in
mouseCode
• mouseCode: number
= 0
鼠标code值,枚举值可以参考MouseCode MouseCode
Defined in
ctrlKey
• ctrlKey: boolean
事件发生时 Ctrl 是否被按下
Defined in
altKey
• altKey: boolean
事件发生时 Alt 是否被按下
Defined in
shiftKey
• shiftKey: boolean
事件发生时 Shift 是否被按下
Defined in
targetTouches
• targetTouches: TouchData
[]
手指触摸到绑定事件的节点上的触摸点的集合 touch列表 TouchData
Defined in
changedTouches
• changedTouches: TouchData
[]
触摸事件时改变触摸点的集合 touch列表 TouchData
Defined in
touches
• touches: TouchData
[]
手指触摸到屏幕上引起的当前所有触摸点的集合 touch列表 TouchData
Defined in
Constructors
constructor
• new CEvent(eventType?
, data?
)
创建一个作为参数传递给事件侦听器的 Event对象。
Parameters
Name | Type | Default value | Description |
---|---|---|---|
eventType | string | null | {any} 事件类型 |
data | any | null | {any} 附加数据(可选) |
Defined in
src/engine/event/CEvent.ts:100
Methods
stopImmediatePropagation
▸ stopImmediatePropagation(): void
防止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。
Returns
void
Defined in
src/engine/event/CEvent.ts:108
Accessors
isStopImmediatePropagation
• get
isStopImmediatePropagation(): boolean
(只读)是否调用过 stopImmediatePropagation() 方法.
Returns
boolean