DoTween 仅介绍部分常用用法,代码参上:(其它操作见官网:http://dotween.demigiant.com/documentation.php) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;//引用UI using DG.Tweening;//引用DoTween插件 public class DoTweenTest01 : Mo
using UnityEngine;using System.Collections;using DG.Tweening;using UnityEngine.UI; public class TestDoTween : MonoBehaviour { int number = 0; // Use this for initialization void Start () { //FunctionOne(); //FunctionTwo(); //FunctionSequence(); Funct
dotween最原始的用法 using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening; public class DotweenText : MonoBehaviour { public GameObject cube; public RectTransform rectTransform; Vector3 MyValue = ,,); ; // Use thi
using UnityEngine; using System.Collections; using DG.Tweening; using UnityEngine.UI; public class TestDoTween : MonoBehaviour { ; // Use this for initialization void Start () { //FunctionOne(); //FunctionTwo(); //FunctionSequence(); FunctionSet(); }
本文只涉及一些案例,具体查看 DoTween 官方文档. 一. Basics public class Basics : MonoBehaviour { public Transform redCube, greenCube, blueCube, purpleCube; IEnumerator Start() { // Start after one second delay (to ignore Unity hiccups when activating Play mode in Editor
[插值移动]using DG.Tweening;public class GetStart:MomoBehaviour{ public Vector3 myValue = new Vector3(0,0,0); public Transform cubeTransform; public RactTransform taskPanelTransform;//UI界面坐标 void Start(){ //对变量做一个动画(通过插值的方式去修改一个值的变化) DOTween.to( () => my