提交修改

This commit is contained in:
2026-04-06 11:52:41 +08:00
parent ae3002a0e2
commit bfebce8827
7 changed files with 244 additions and 329 deletions

View File

@@ -2,21 +2,38 @@
namespace NBF
{
public abstract class RopeBase : MonoBehaviour, IRope
public abstract class RopeBase : MonoBehaviour
{
[Header("Anchors")] [SerializeField] public Rigidbody startAnchor;
[SerializeField] public Rigidbody endAnchor;
public float CurrentLength { get; protected set; }
protected FRod Rod;
public void Init(FRod rod)
{
Rod = rod;
OnInit();
}
public void SetLineLength(float length)
{
CurrentLength = length;
}
public float GetCurrentLength()
{
return CurrentLength;
}
protected virtual void OnInit()
{
}
protected virtual void OnSetLineLength(float length)
{
}
}
}