UIDragCamera
UIDragCamera类引用
Allows dragging of the camera object and restricts camera's movement to be within bounds of the area created by the rootForBounds colliders. More...
Public Member Functions公共成员函数 | |
bool | ConstrainToBounds (bool immediate) |
Constrain the current camera's position to be within the viewable area's bounds. 限制当前摄影机的位置在可视区域的边界之内。 | |
Public Attributes | |
Camera | target |
Target object that will be dragged. 将被拖走的目标对象。 | |
Transform | rootForBounds |
Root object that will be used for drag-limiting bounds. 将用于限制拖拽范围边界 的根对象。 | |
Vector2 | scale = Vector2.one |
Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction. 应用到拖拽增量的缩放值。设置X或Y为0来拒绝在那个方向的拖拽。 | |
float | scrollWheelFactor = 0f |
Effect the scroll wheel will have on the momentum. 滚轮在滑动时的动力影响值。 | |
UIDragObject.DragEffect | dragEffect = UIDragObject.DragEffect.MomentumAndSpring |
Effect to apply when dragging. 拖拽时要应用的影响值。 | |
float | momentumAmount = 35f |
How much momentum gets applied when the press is released after dragging. 当拖拽后释放按压时 可以应用的动力是多少。 |
Detailed Description详细文档
Allows dragging of the camera object and restricts camera's movement to be within bounds of the area created by the rootForBounds colliders.
允许拖动摄像机和限制摄像机在由rootForBounds碰撞器创建的区域边界内运动。
Member Function Documentation成员函数文档
bool UIDragCamera.ConstrainToBounds | ( | bool | immediate | ) |
Constrain the current camera's position to be within the viewable area's bounds.
限制当前摄影机的位置在可视区域的边界之内。
Member Data Documentation成员数据文档
UIDragObject.DragEffect UIDragCamera.dragEffect = UIDragObject.DragEffect.MomentumAndSpring |
Effect to apply when dragging. (上面已有 不再赘述)
float UIDragCamera.momentumAmount = 35f |
How much momentum gets applied when the press is released after dragging.
Transform UIDragCamera.rootForBounds |
Root object that will be used for drag-limiting bounds.
Vector2 UIDragCamera.scale = Vector2.one |
Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction.
float UIDragCamera.scrollWheelFactor = 0f |
Effect the scroll wheel will have on the momentum.
Camera UIDragCamera.target |
Target object that will be dragged.
The documentation for this class was generated from the following file:
- Assets/NGUI/Scripts/Interaction/UIDragCamera.cs