From 392f839c8ddff781479e3383d9b1fd99c8ed663c Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Thu, 26 Nov 2020 11:50:02 +0800
Subject: [PATCH] 沒有配金幣掉落,然後掉落10金幣bug 過了新手還走新手關的bug

---
 Assets/Scripts/UI/FlyImage.cs |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Assets/Scripts/UI/FlyImage.cs b/Assets/Scripts/UI/FlyImage.cs
index b1ba16d..14fa3ca 100644
--- a/Assets/Scripts/UI/FlyImage.cs
+++ b/Assets/Scripts/UI/FlyImage.cs
@@ -73,11 +73,11 @@
         tmpV.x -= UnityEngine.Random.Range(10, 15);
         if (isUp)
         {
-            tmpV.z += UnityEngine.Random.Range(20, 40);
+            tmpV.z += UnityEngine.Random.Range(10, 20);
         }
         else
         {
-            tmpV.z -= UnityEngine.Random.Range(20, 40);
+            tmpV.z -= UnityEngine.Random.Range(10, 20);
         }
 
         return tmpV;
@@ -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 + 3 >= point.Count)
         {
             //到终点了
             Close();
+            return;
+        }
+        else
+        {
+            transform.DOMove(point[index], 0.01f).OnComplete(Bezier_Move);
+
+            index += 3;
         }
     }
 

--
Gitblit v1.9.1