From c55d38b3a6e6290271076b3add49de5761936b21 Mon Sep 17 00:00:00 2001 From: "Bob.Song" Date: Thu, 16 Apr 2026 23:13:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=8B=E8=AF=95=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../New/View/FishingLine/FishingLineSolver.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Fishing/New/View/FishingLine/FishingLineSolver.cs b/Assets/Scripts/Fishing/New/View/FishingLine/FishingLineSolver.cs index ff29a6d99..7818ab78b 100644 --- a/Assets/Scripts/Fishing/New/View/FishingLine/FishingLineSolver.cs +++ b/Assets/Scripts/Fishing/New/View/FishingLine/FishingLineSolver.cs @@ -39,7 +39,6 @@ namespace NBF private void Awake() { - } private void Start() @@ -54,6 +53,7 @@ namespace NBF private void FixedUpdate() { UpdateAnchorNode(); + UpdateStretchLength(); } #region Start Node @@ -102,11 +102,6 @@ namespace NBF #region Line - /// - /// 当前逻辑链总长度超出配置总长度的部分,小于等于零时记为 0。 - /// - public float CurrentStretchLength { get; private set; } - /// /// 设置指定逻辑段的配置长度。 /// segmentIndex 为 0 时表示第一段;大于 0 时表示对应逻辑节点到下一个逻辑节点的线长。 @@ -221,7 +216,12 @@ namespace NBF #region 极限判定 + /// + /// 当前逻辑链总长度超出配置总长度的部分,小于等于零时记为 0。 + /// [Header("Limit Detection")] + public float CurrentStretchLength { get; private set; } + [Min(0f)] // 极限判定的长度容差,允许链路在总长或单段长度上存在少量误差。 [SerializeField] @@ -273,6 +273,11 @@ namespace NBF return Mathf.InverseLerp(lengthLimitTolerance, breakStretchThreshold, stretchLength) * 100f; } + private void UpdateStretchLength() + { + + } + #endregion #region Renderer