1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00
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

24 lines
554 B
C#

using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Temp : BrainBase
{
[SerializeField]
private Vector3 pos;
[SerializeField]
private float duration;
[SerializeField]
private GameObject goToMove;
private Tweener moveTween;
// Update is called once per frame
void Update() {
if(moveTween == null) {
moveTween = goToMove.transform.DOLocalMove(pos, duration).SetAutoKill(false);
}
moveTween.ChangeEndValue(pos, duration, true);
}
}