浏览代码

修改拖尾

DESKTOP-BGJIU14\ck 3 周之前
父节点
当前提交
cfb91fc1e2
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Assets/Scripts/Core/Utility/TailingLine.cs

+ 3 - 2
Assets/Scripts/Core/Utility/TailingLine.cs

@@ -17,7 +17,7 @@ public class TailingLine : MonoBehaviour
     public AnimationCurve offQuanZhong;
 
     public float quanZhong=5;
-
+    public float disStrength=0.5f;
     // public float addTime;
     public Transform rootTran;
     public int count;
@@ -31,6 +31,7 @@ public class TailingLine : MonoBehaviour
 
     private void Awake()
     {
+        _linePointInfo.Clear();
         _lineRenderer = GetComponent<LineRenderer>();
         Init();
     }
@@ -90,7 +91,7 @@ public class TailingLine : MonoBehaviour
             }
             else
             {
-                md = Mathf.Lerp(md, minDis, at);
+                md = Mathf.Lerp(md, minDis, at*disStrength);
             }
 
             if (m == i)