SwipeGesture Class |
Namespace: FairyGUI
public class SwipeGesture : EventDispatcher
The SwipeGesture type exposes the following members.
| Name | Description | |
|---|---|---|
| SwipeGesture | Initializes a new instance of the SwipeGesture class |
| Name | Description | |
|---|---|---|
| host | ||
| onAction |
当手指从按下到离开经过的距离大于actionDistance时派发该事件。
| |
| onBegin |
当手指开始扫动时派发该事件。
| |
| onEnd |
手指离开屏幕时派发该事件。
| |
| onMove |
手指在滑动时派发该事件。
|
| Name | Description | |
|---|---|---|
| AddEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
| AddEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
| BroadcastEvent | (Inherited from EventDispatcher.) | |
| BubbleEvent | (Inherited from EventDispatcher.) | |
| DispatchEvent(String) | (Inherited from EventDispatcher.) | |
| DispatchEvent(EventContext) | (Inherited from EventDispatcher.) | |
| DispatchEvent(String, Object) | (Inherited from EventDispatcher.) | |
| DispatchEvent(String, Object, Object) | (Inherited from EventDispatcher.) | |
| Dispose | Releases all resources used by the SwipeGesture | |
| Enable | ||
| RemoveEventListener(String, EventCallback0) | (Inherited from EventDispatcher.) | |
| RemoveEventListener(String, EventCallback1) | (Inherited from EventDispatcher.) | |
| RemoveEventListeners | (Inherited from EventDispatcher.) | |
| RemoveEventListeners(String) | (Inherited from EventDispatcher.) |
| Name | Description | |
|---|---|---|
| ACTION_DISTANCE | ||
| actionDistance |
The min distance to fire onAction event
派发onAction事件的最小距离。如果手指扫过的距离少于此值,onAction不会触发(但onEnd仍然会派发)
| |
| delta |
移动的变化值
| |
| position |
你可以在onBegin事件中设置这个值,那个后续将根据手指移动的距离修改这个值。如果不设置,那position初始为(0,0),反映手指扫过的距离。
| |
| snapping |
是否把变化量强制为整数。默认true。
| |
| velocity |
手指离开时的加速度
|