关于DOTween的一些控制(随时更新)

1、UGUI按键控制正放倒放

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

public class Panel : MonoBehaviour {

	private DOTweenAnimation tweenAnimation;

	private bool isShow = false;

	// Use this for initialization
	void Start () {
		tweenAnimation = GetComponent ();
		//tweenAnimation.DOPlay ();
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public void OnClick(){
		if (isShow == true) {
			tweenAnimation.DOPlayBackwards ();//倒放
			isShow = false;
		} else {
			tweenAnimation.DOPlayForward ();
			isShow = true;
		}
	}
}


你可能感兴趣的:(C#,技术·Unity3D,学习日记,U3D插件)