mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 17:26:03 +08:00
44 lines
706 B
C#
44 lines
706 B
C#
using DG.Tweening;
|
|
using UnityEngine;
|
|
|
|
public class RewindCallbackModeTests : BrainBase
|
|
{
|
|
public Transform target;
|
|
Tween t;
|
|
|
|
void Start()
|
|
{
|
|
t = target.DOMoveX(3, 2).SetLoops(-1, LoopType.Yoyo).SetAutoKill(false)
|
|
.OnRewind(() => Debug.Log("<color=#00ff00>Rewind callback</color>"));
|
|
}
|
|
|
|
public void Play()
|
|
{
|
|
t.Play();
|
|
}
|
|
|
|
public void PlayForward()
|
|
{
|
|
t.PlayForward();
|
|
}
|
|
|
|
public void Pause()
|
|
{
|
|
t.Pause();
|
|
}
|
|
|
|
public void Rewind()
|
|
{
|
|
t.Rewind();
|
|
}
|
|
|
|
public void PlayBackwards()
|
|
{
|
|
t.PlayBackwards();
|
|
}
|
|
|
|
public void SmoothRewind()
|
|
{
|
|
t.SmoothRewind();
|
|
}
|
|
} |