DoTween浅入淡出效果

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


public class Cell : MonoBehaviour {
Button btn;
Tweener tweener;


void Start () {
btn = GetComponent<Button> ();
btn.onClick.AddListener (OnClickBtn);


tweener = transform.DOScale (Vector3.one * 0.8f, 0.7f);
tweener.SetAutoKill (false);
tweener.SetEase (Ease.Linear).SetLoops (-1, LoopType.Yoyo);
tweener.Pause ();


}


void OnClickBtn(){
tweener.Play ();

}



版权声明:本文为abcd15533969610原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。