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/Bugs/NestedSequencesCallbacks.cs
Daniele Giardini ec1756130a - Fixed issues with looping tweens and super-tiny durations
- Allowed DOVirtual.DelayedCall to be set in a loop
2015-03-25 10:32:36 +01:00

29 lines
634 B
C#

using UnityEngine;
using System.Collections;
using DG.Tweening;
public class NestedSequencesCallbacks : BrainBase
{
public Transform target;
int count;
void Start()
{
int loops = 10;
DOTween.Sequence()
// .Append(DOTween.Sequence()
// .InsertCallback(0.0000001f, ()=> Debug.Log("Nested Sequence callback"))
// // .AppendInterval(0.5f)
// .SetLoops(10)
// )
.Append(
target.DOMoveX(3, 0.0000001f)
.SetLoops(loops)
.OnStepComplete(()=> {
count++;
Debug.Log("Nested Tween callback " + count + "/" + loops);
})
)
.OnComplete(()=> Debug.Log("Sequence complete"));
}
}