UGUI DOTeen插件
来源:互联网 发布:硕放菜鸟网络招聘 编辑:程序博客网 时间:2024/06/06 04:08
- using
UnityEngine; - using
System.Collections; - using
UnityEngine.UI; - using
DG.Tweening; -
- public
class UIFirstAnima : MonoBehaviour - {
-
private Tweener m_pos; -
private Tweener m_rota; -
private Tweener m_scale; -
private Tweener m_color; -
void Start () { -
// 全局初始化 -
DOTween.Init(true, true, LogBehaviour.ErrorsOnly).SetCapacity( 200,10); -
Image image = transform.GetComponent(); -
// 位置 -
m_pos = image.rectTransform.DOMove(new Vector3(Screen.width 0.5f,* Screen.height 0.5f,0),* 1f); -
m_pos.SetEase(Ease.OutCubic); -
m_pos.SetLoops(10,LoopType.Yoyo); -
// 旋转 -
m_rota = image.rectTransform.DORotate(new Vector3( 0,180,0),1); -
m_rota.SetEase(Ease.Linear); -
m_rota.SetLoops(10, LoopType.Yoyo); -
// 缩放 -
m_scale = image.rectTransform.DOScale(new Vector3( 0.6f,0.6f, 1f), 1); -
m_scale.SetEase(Ease.Linear); -
m_scale.SetLoops(10, LoopType.Yoyo); -
// 颜色 -
m_color = image.material.DOColor(new Color(0f,1f,1f, 0.7f),1f); -
m_color.SetEase(Ease.Linear); -
m_color.SetLoops(10, LoopType.Yoyo); -
// 注册开始和结束事件 -
m_pos.OnStart(AnimaStart); -
m_pos.OnComplete(AnimaEnd); -
} -
private void AnimaStart() -
{ -
Debug.Log("动画开始"); -
} -
private void AnimaEnd() -
{ -
Debug.Log("动画结束"); -
} - }
0 0
- UGUI DOTeen插件
- Unity Toast插件(UGUI版)
- [UGUI][Unity插件]载入框插件载入
- VRTK插件之与UGUI的交互
- UGUI
- UGUI
- UGUI
- UGUI
- UGUI
- UGUI
- UGUI
- UGUI
- ugui
- UGUI
- UGUI
- UGUI
- UGUI
- uGUI
- 日期时间格式化
- 浅谈算法和数据结构: 二 基本排序算法
- 局域网时间同步NTP服务架设
- 网络编程--UDP下的Socket
- 不可视索引
- UGUI DOTeen插件
- Android 应用的真正入口 - ZygoteInit.java
- mysql索引总结
- ViewGroup是如何加载布局中的view?
- 通过sqlcmd执行多数据(sqlserver)
- android 用代码打开 gprs(流量开关) android 5.0 ROOT
- 归并排序(自上向下)
- 创新~也许雷同!
- NLTK+stanford parser