Event.EventAcceleration 类型
继承于 Event
模块: cc
加速度事件
索引
属性(properties)
typeString事件类型。bubblesBoolean表示该事件是否进行冒泡。targetObject最初事件触发的目标currentTargetObject当前目标eventPhaseNumber事件阶段
方法
constructorunuse重置对象池中存储的事件。reuse用于对象池再次使用的事件。stopPropagation停止传递当前事件。stopPropagationImmediate立即停止当前事件的传递,事件甚至不会被分派到所连接的当前目标。isStopped检查该事件是否已经停止传递.getCurrentTarget获取当前目标节点getType获取事件类型
Details
属性(properties)
type
事件类型。
| meta | description |
|---|---|
| 类型 | String |
| 定义于 | cocos2d/core/event/event.js:44 |
bubbles
表示该事件是否进行冒泡。
| meta | description |
|---|---|
| 类型 | Boolean |
| 定义于 | cocos2d/core/event/event.js:52 |
target
最初事件触发的目标
| meta | description |
|---|---|
| 类型 | Object |
| 定义于 | cocos2d/core/event/event.js:60 |
currentTarget
当前目标
| meta | description |
|---|---|
| 类型 | Object |
| 定义于 | cocos2d/core/event/event.js:68 |
eventPhase
事件阶段
| meta | description |
|---|---|
| 类型 | Number |
| 定义于 | cocos2d/core/event/event.js:76 |
方法
constructor
| meta | description |
|---|---|
| 定义于 | cocos2d/core/event/event.js:38 |
参数列表
typeString The name of the event (case-sensitive), e.g. "click", "fire", or "submit"bubblesBoolean A boolean indicating whether the event bubbles up through the tree or not
unuse
重置对象池中存储的事件。
| meta | description |
|---|---|
| 返回 | String |
| 定义于 | cocos2d/core/event/event.js:111 |
reuse
用于对象池再次使用的事件。
| meta | description |
|---|---|
| 返回 | String |
| 定义于 | cocos2d/core/event/event.js:126 |
stopPropagation
停止传递当前事件。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/event/event.js:137 |
stopPropagationImmediate
立即停止当前事件的传递,事件甚至不会被分派到所连接的当前目标。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/event/event.js:146 |
isStopped
检查该事件是否已经停止传递.
| meta | description |
|---|---|
| 返回 | Boolean |
| 定义于 | cocos2d/core/event/event.js:156 |
getCurrentTarget
获取当前目标节点
| meta | description |
|---|---|
| 返回 | Node |
| 定义于 | cocos2d/core/event/event.js:166 |
getType
获取事件类型
| meta | description |
|---|---|
| 返回 | String |
| 定义于 | cocos2d/core/event/event.js:181 |