• 大小: 0.20M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: 其他
  • 标签: 其他  

资源简介


Unity GUI(简称UGUI)中的常见按钮缩放效果,使用了DoTween作为缓动的方式

资源截图

代码片段和文件信息

using UnityEngine;
using System.Collections;
using DG.Tweening;

public class Basics : MonoBehaviour
{
public Transform cubeA cubeB;

void Start()
{
// Initialize DOTween (needs to be done only once).
// If you don‘t initialize DOTween yourself
// it will be automatically initialized with default values.
DOTween.Init(false true LogBehaviour.ErrorsOnly);

// Create two identical infinitely looping tweens
// one with the shortcuts way and the other with the generic way.
// Both will be set to “relative“ so the given movement will be calculated
// relative to each target‘s position.

// cubeA > SHORTCUTS WAY
cubeA.DOMove(new Vector3(-2 2 0) 1).SetRelative().SetLoops(-1 LoopType.Yoyo);

// cubeB > GENERIC WAY
DOTween.To(()=> cubeB.position x=> cubeB.position = x new Vector3(-2 2 0) 1).SetRelative().SetLoops(-1 LoopType.Yoyo);

// Voilà.
// To see all available shortcuts check out DOTween‘s online documentation.
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-10-27 15:08  Assets\
     文件       23476  2015-10-27 15:07  Assets\Button.unity
     文件          90  2015-10-27 14:21  Assets\Button.unity.meta
     目录           0  2015-10-27 15:08  Assets\Demigiant\
     文件         107  2015-10-27 14:27  Assets\Demigiant.meta
     目录           0  2015-10-27 15:08  Assets\Demigiant\DOTween\
     文件         107  2015-10-27 14:27  Assets\Demigiant\DOTween.meta
     文件      135168  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween.dll
     文件       51527  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween.dll.mdb
     文件          90  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween.dll.mdb.meta
     文件         153  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween.dll.meta
     文件      163579  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween.xml
     文件          93  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween.xml.meta
     文件        8192  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween43.dll
     文件        1290  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween43.dll.mdb
     文件          90  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween43.dll.mdb.meta
     文件         153  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween43.dll.meta
     文件        5123  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween43.xml
     文件          93  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween43.xml.meta
     文件       16384  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween46.dll
     文件        4170  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween46.dll.mdb
     文件          90  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween46.dll.mdb.meta
     文件         153  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween46.dll.meta
     文件       16530  2015-05-30 04:12  Assets\Demigiant\DOTween\DOTween46.xml
     文件          93  2015-10-27 14:27  Assets\Demigiant\DOTween\DOTween46.xml.meta
     目录           0  2015-10-27 15:08  Assets\Demigiant\DOTween\Editor\
     文件         107  2015-10-27 14:27  Assets\Demigiant\DOTween\Editor.meta
     文件       30720  2015-05-30 04:11  Assets\Demigiant\DOTween\Editor\DOTweenEditor.dll
     文件        5727  2015-05-30 04:11  Assets\Demigiant\DOTween\Editor\DOTweenEditor.dll.mdb
     文件          90  2015-10-27 14:27  Assets\Demigiant\DOTween\Editor\DOTweenEditor.dll.mdb.meta
     文件         153  2015-10-27 14:27  Assets\Demigiant\DOTween\Editor\DOTweenEditor.dll.meta
............此处省略54个文件信息

评论

共有 条评论