增加表格
This commit is contained in:
@@ -8,25 +8,27 @@ using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public enum LineType
|
||||
{
|
||||
Hand,
|
||||
HandDouble,
|
||||
Spinning,
|
||||
SpinningFloat,
|
||||
}
|
||||
|
||||
public class FLine : FGearBase
|
||||
{
|
||||
// [SerializeField] private ObiParticleAttachment startParticleAttachment;
|
||||
public LineType LineType;
|
||||
|
||||
[SerializeField] private bool isLureConnect;
|
||||
[SerializeField] private RodLine rodLine;
|
||||
[SerializeField] private Rope fishingRope;
|
||||
[SerializeField] private Rope bobberRope;
|
||||
public LureController Lure;
|
||||
public BobberController Bobber;
|
||||
|
||||
|
||||
|
||||
private float _groundSetting = 0.5f;
|
||||
|
||||
private float _LineOnSpool = 100f;
|
||||
|
||||
private float _LineThickness = 0.0007f;
|
||||
|
||||
public bool IsLure => isLureConnect;
|
||||
|
||||
// public event Action OnLinePulled;
|
||||
|
||||
protected override void OnInit()
|
||||
@@ -109,16 +111,9 @@ namespace NBF
|
||||
Lure.RBody.useGravity = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void EnableLineRenderers()
|
||||
{
|
||||
// foreach (ObiRopeExtrudedRenderer item in GetComponentsInChildren<ObiRopeExtrudedRenderer>().ToList())
|
||||
// {
|
||||
// item.enabled = true;
|
||||
// }
|
||||
}
|
||||
|
||||
public void SetObiRopeStretch(float value)
|
||||
public void SetTargetLength(float value)
|
||||
{
|
||||
Log.Error($"SetObiRopeStretch={value}");
|
||||
fishingRope.SetTargetLength(value);
|
||||
|
||||
@@ -12,8 +12,7 @@ namespace NBF
|
||||
public class FRod : FHandItem
|
||||
{
|
||||
private float _tension;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 可用的
|
||||
/// </summary>
|
||||
@@ -33,11 +32,6 @@ namespace NBF
|
||||
public FLine Line;
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 鱼线处理器
|
||||
// /// </summary>
|
||||
// public FLineHandler lineHandler;
|
||||
|
||||
public Transform GearRoot;
|
||||
|
||||
// public FWaterDisplacement LureHookWaterDisplacement;
|
||||
@@ -67,11 +61,7 @@ namespace NBF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float currentLineTension;
|
||||
public float linelenghtDiferent;
|
||||
public float currentLineStrenght;
|
||||
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -99,13 +89,13 @@ namespace NBF
|
||||
public void SetLineLength(float lineLength, bool stretchRope = true)
|
||||
{
|
||||
if (!Line) return;
|
||||
if (Line.IsLure)
|
||||
if (Line.LineType == LineType.Spinning)
|
||||
{
|
||||
//没有浮漂类型
|
||||
Line.Lure.SetJointDistance(lineLength);
|
||||
if (stretchRope)
|
||||
{
|
||||
Line.SetObiRopeStretch(Tension > 0f ? 0f : lineLength);
|
||||
Line.SetTargetLength(Tension > 0f ? 0f : lineLength);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -115,7 +105,7 @@ namespace NBF
|
||||
Line.Bobber.SetJointDistance(lineLength - floatLength);
|
||||
if (stretchRope)
|
||||
{
|
||||
Line.SetObiRopeStretch(Tension > 0f ? 0f : lineLength - floatLength);
|
||||
Line.SetTargetLength(Tension > 0f ? 0f : lineLength - floatLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,7 +216,6 @@ namespace NBF
|
||||
if (Hook)
|
||||
{
|
||||
Hook.Init(Player, this);
|
||||
// LureHookWaterDisplacement = Hook.GetComponent<FWaterDisplacement>();
|
||||
}
|
||||
|
||||
if (Bait)
|
||||
|
||||
Reference in New Issue
Block a user