private void Update() { delta = Time.realtimeSinceStartup - lastTime; lastTime = Time.realtimeSinceStartup; if (animType == AnimType.None) { return; } bool bWork = true; saveDelta += delta * invTime; if (saveDelta >= 1f) { saveDelta = 1f; bWork = false; } Vector3 pos = AnimCurveController.GetValue(curve, start, end, saveDelta); moveTarget.localPosition = pos; if (!bWork) { if (finishCallback != null) { finishCallback(); } animType = AnimType.None; } }