NGUI v2.0 Interaction_5:UIButtonOffset UI按钮偏移类

本文介绍了一个简单的Unity脚本UIButtonOffset,该脚本使按钮在鼠标悬停或被按下时发生可见的位移。通过TweenTarget变换及hover和pressed状态的Vector3设置实现效果。

UIButtonOffset

 

 

UIButtonOffset Class Reference

UIButtonOffset类引用

Simple example script of how a button can be offset visibly when the mouse hovers over it or it gets pressed.More...

当鼠标悬停在一个按钮之上或点击它时   按钮明显的偏移    的简单示例脚本。更多…

List of all members.

Public Attributes公共属性

Transform tweenTarget
Vector3 hover = Vector3.zero
Vector3 pressed = new Vector3(2f, -2f)
float duration = 0.2f

Detailed Description

Simple example script of how a button can be offset visibly when the mouse hovers over it or it gets pressed.

当鼠标悬停在一个按钮之上或点击它时   按钮明显的偏移    的简单示例脚本。更多…


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值