public override void tick(float totalElapsedTime)
{
float t = _easeFunction(totalElapsedTime, 0f, 1f, _ownerTween.duration);
Vector3 vector = _path.getPointOnPath(t);
if (_isRelative)
{
vector += _startValue;
}
switch (_lookAtType)
{
case GoLookAtType.NextPathNode:
_smoothedRotation.smoothValue = ((!vector.Equals(_target.position)) ? Quaternion.LookRotation(vector - _target.position) : Quaternion.identity);
_target.rotation = _smoothedRotation.smoothValue;
break;
case GoLookAtType.TargetTransform:
_target.LookAt(_lookTarget, Vector3.up);
break;
}
if (_useLocalPosition)
{
_target.localPosition = vector;
}
else
{
_target.position = vector;
}
}