代码提交
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user