1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 01:06:02 +08:00
2015-05-27 13:01:57 +02:00

29 lines
608 B
C#

using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Follow : BrainBase
{
public Transform target, follow;
public float someInt;
void Start()
{
Tweener tween = target.DOMove(follow.position, 2f)
.SetEase(Ease.OutExpo);
tween.OnUpdate(() =>
{
// someInt = 0;
// someInt = follow.position.x + tween.ElapsedPercentage();
// tween.ChangeEndValue(follow.position, true);
SomeFunction<Vector3>(follow.position);
});
}
void SomeFunction<T>(T obj)
{
someInt = 1;
}
}