mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-21 01:36:05 +08:00
24 lines
554 B
C#
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);
|
|
}
|
|
} |