1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 17:26:03 +08:00
dotween-upm-fork/UnityTests.Unity5/Assets/_Tests/CompleteWithCallbacks.cs

23 lines
521 B
C#

using UnityEngine;
using System.Collections;
using DG.Tweening;
public class CompleteWithCallbacks : MonoBehaviour
{
public Transform target;
IEnumerator Start()
{
Sequence s = DOTween.Sequence();
s.AppendCallback(()=> Debug.Log("Start callback"))
.Append(target.DOMoveX(3, 1))
.AppendCallback(()=> Debug.Log("Mid callback"))
.Append(target.DOMoveY(3, 1))
.AppendCallback(()=> Debug.Log("End callback"));
yield return new WaitForSeconds(0.5f);
Debug.Log("WAITED");
s.Complete(true);
}
}