From 5404df9dda332b69e7fdee296b584e0e27e562f8 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Tue, 03 Nov 2020 15:01:38 +0800 Subject: [PATCH] 改进飞行特效 --- Assets/Scripts/UI/FlyImage.cs | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/UI/FlyImage.cs b/Assets/Scripts/UI/FlyImage.cs index b1ba16d..d138533 100644 --- a/Assets/Scripts/UI/FlyImage.cs +++ b/Assets/Scripts/UI/FlyImage.cs @@ -88,12 +88,17 @@ /// </summary> private void Bezier_Move() { - transform.DOMove(point[index], 0.01f).OnComplete(Bezier_Move); - index++; - if (index >= point.Count) + if (index + 2 >= point.Count) { //到终点了 Close(); + return; + } + else + { + transform.DOMove(point[index], 0.01f).OnComplete(Bezier_Move); + + index += 2; } } -- Gitblit v1.9.1