NGUI v2.0 Interaction_13:UIDragCamera UI拖拽摄像机类

UIDragCamera

 

 

UIDragCamera Class Reference

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...

允许拖动摄像机和限制摄像机在由rootForBounds碰撞器创建的区域边界内运动。更多…

Inheritance diagram for UIDragCamera:
继承关系图UIDragCamera:

List of all members.

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.                                                            (上面已有    不再赘述)

How much momentum gets applied when the press is released after dragging.

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.

Effect the scroll wheel will have on the momentum.

Target object that will be dragged.


The documentation for this class was generated from the following file:
  • Assets/NGUI/Scripts/Interaction/UIDragCamera.cs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值