33 lines
720 B
C#
33 lines
720 B
C#
using UnityEngine;
|
|
|
|
namespace NBF
|
|
{
|
|
public class FishingLineNode : MonoBehaviour
|
|
{
|
|
public enum NodeType
|
|
{
|
|
Start,
|
|
Float,
|
|
Weight,
|
|
Tail
|
|
}
|
|
|
|
private FishingLineSolver _solver;
|
|
[Header("Node")] [SerializeField] private NodeType nodeType = NodeType.Tail;
|
|
[SerializeField] private Rigidbody body;
|
|
|
|
public NodeType Type
|
|
{
|
|
get => nodeType;
|
|
set => nodeType = value;
|
|
}
|
|
|
|
public Rigidbody Body => body;
|
|
|
|
private void Awake()
|
|
{
|
|
_solver = GetComponentInParent<FishingLineSolver>();
|
|
body = GetComponent<Rigidbody>();
|
|
}
|
|
}
|
|
} |