提交测试脚本

This commit is contained in:
Bob.Song
2026-04-16 23:13:02 +08:00
parent e8b1a3e0f1
commit c55d38b3a6

View File

@@ -39,7 +39,6 @@ namespace NBF
private void Awake() private void Awake()
{ {
} }
private void Start() private void Start()
@@ -54,6 +53,7 @@ namespace NBF
private void FixedUpdate() private void FixedUpdate()
{ {
UpdateAnchorNode(); UpdateAnchorNode();
UpdateStretchLength();
} }
#region Start Node #region Start Node
@@ -102,11 +102,6 @@ namespace NBF
#region Line #region Line
/// <summary>
/// 当前逻辑链总长度超出配置总长度的部分,小于等于零时记为 0。
/// </summary>
public float CurrentStretchLength { get; private set; }
/// <summary> /// <summary>
/// 设置指定逻辑段的配置长度。 /// 设置指定逻辑段的配置长度。
/// segmentIndex 为 0 时表示第一段;大于 0 时表示对应逻辑节点到下一个逻辑节点的线长。 /// segmentIndex 为 0 时表示第一段;大于 0 时表示对应逻辑节点到下一个逻辑节点的线长。
@@ -221,7 +216,12 @@ namespace NBF
#region #region
/// <summary>
/// 当前逻辑链总长度超出配置总长度的部分,小于等于零时记为 0。
/// </summary>
[Header("Limit Detection")] [Header("Limit Detection")]
public float CurrentStretchLength { get; private set; }
[Min(0f)] [Min(0f)]
// 极限判定的长度容差,允许链路在总长或单段长度上存在少量误差。 // 极限判定的长度容差,允许链路在总长或单段长度上存在少量误差。
[SerializeField] [SerializeField]
@@ -273,6 +273,11 @@ namespace NBF
return Mathf.InverseLerp(lengthLimitTolerance, breakStretchThreshold, stretchLength) * 100f; return Mathf.InverseLerp(lengthLimitTolerance, breakStretchThreshold, stretchLength) * 100f;
} }
private void UpdateStretchLength()
{
}
#endregion #endregion
#region Renderer #region Renderer