Files
Fishing2/Assets/Scripts/Fishing/Rope/RopeBase.cs
2026-04-06 11:52:41 +08:00

39 lines
773 B
C#

using UnityEngine;
namespace NBF
{
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)
{
}
}
}