diff --git a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs b/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs deleted file mode 100644 index 0d36d77cc..000000000 --- a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs +++ /dev/null @@ -1,194 +0,0 @@ -// using NBF; -// using Obi; -// using UnityEngine; -// -// public class FLineHandler : MonoBehaviour -// { -// public enum LineType -// { -// None = 0, -// OneSegment = 1, -// TwoSegment = 2, -// ThereSegment = 3 -// } -// -// public LineType lineType = LineType.TwoSegment; -// -// // public ObiParticleAttachment startParticleAttachment; -// -// public ObiRope obiRopeSegment_1; -// -// public ObiRope obiRopeSegment_2; -// -// public ObiRope obiRopeSegment_3; -// -// public FixedLine LineConnector_0; -// -// public SpringJoint LineConnector_1; -// -// public SpringJoint LineConnector_2; -// -// public SpringJoint LineConnector_3; -// -// // [HideInInspector] public FFishingLine currentRodFishingLineComponent; -// -// // public ObiParticleAttachment toRodConnector; -// -// // public float PhisicsLineOut { get; set; } -// -// public float ObiLineOut; -// -// [HideInInspector] public Rigidbody EndLineRigidbody_0; -// -// [HideInInspector] public Rigidbody EndLineRigidbody_1; -// -// [HideInInspector] public Rigidbody EndLineRigidbody_2; -// -// [HideInInspector] public Rigidbody EndLineRigidbody_3; -// -// // public JointPinchController pinchController; -// -// public FRod Rod; -// -// private Transform waterPlane; -// -// -// public LineRenderer LineRenderer1; -// public LineRenderer LineRenderer2; -// -// // public float ropeToHookDistance; -// -// void Start() -// { -// ObiLineOut = obiRopeSegment_1.stretchingScale; -// if ((bool)LineConnector_0) -// { -// EndLineRigidbody_0 = LineConnector_0.GetComponent(); -// } -// -// if ((bool)LineConnector_1) -// { -// EndLineRigidbody_1 = LineConnector_1.GetComponent(); -// } -// -// if ((bool)LineConnector_2) -// { -// EndLineRigidbody_2 = LineConnector_2.GetComponent(); -// // var fixedJoint = LineConnector_2.GetComponent(); -// // pinchController = LineConnector_2.gameObject.AddComponent(); -// } -// -// if ((bool)LineConnector_3) -// { -// EndLineRigidbody_3 = LineConnector_3.GetComponent(); -// } -// -// waterPlane = GameObject.FindGameObjectWithTag("Water").transform; -// -// Debug.LogError($"rope.restLength={obiRopeSegment_1.restLength} LineConnector_1={LineConnector_1.maxDistance}"); -// } -// -// -// void Update() -// { -// if (!Rod) return; -// -// -// // ropeToHookDistance = Vector3.Distance(toRodConnector.transform.position, LineConnector_1.transform.position); -// -// ObiLineOut = 0.1f + Rod.lineLength; -// float target = (0f - Mathf.Clamp(Rod.linelenghtDiferent, -1f, 0f)) * 0.1f; -// if (Rod.linelenghtDiferent >= 0f) -// { -// obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, -// Time.smoothDeltaTime * (1f * Rod.linelenghtDiferent)); -// } -// else -// { -// obiRopeSegment_1.stretchCompliance = Mathf.MoveTowards(obiRopeSegment_1.stretchCompliance, target, -// Time.smoothDeltaTime * 0.1f); -// } -// -// if (Rod.lineLength == 0f) -// { -// obiRopeSegment_1.stretchCompliance = 0f; -// } -// -// if ((bool)obiRopeSegment_2) -// { -// if (!Rod.currentFish) -// { -// obiRopeSegment_2.stretchCompliance = obiRopeSegment_2.stretchingScale * 0.004f; -// } -// else -// { -// obiRopeSegment_2.stretchCompliance = 0f; -// } -// -// //TODO:TEST -// obiRopeSegment_2.stretchingScale = 0.13F; -// } -// -// obiRopeSegment_1.stretchingScale = ObiLineOut; -// obiRopeSegment_1.stretchingScale = 1; -// LineConnector_1.maxDistance = 0.1f + Rod.lineLength; -// if (Input.GetKey(KeyCode.E)) -// { -// // var speed = 1; -// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); -// // Debug.Log(obiRopeSegment_1.restLength); -// } -// -// // var addLength = LineConnector_1.maxDistance - obiRopeSegment_1.restLength; -// // if (Mathf.Abs(addLength) > 0.001f) -// // { -// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); -// // } -// -// // if (!Mathf.Approximately(LineConnector_1.maxDistance, obiRopeSegment_1.restLength)) -// // { -// // obiRopeCursor_1.ChangeLength(LineConnector_1.maxDistance); -// // } -// -// // obiRopeCursor_1.pos -// -// -// // LineConnector_1.minDistance = LineConnector_1.maxDistance; -// } -// -// -// public void SetSegmentTwoLenght(float lenght) -// { -// LineConnector_2.maxDistance = lenght; -// // obiRopeCursor_2.ChangeLength(lenght); -// // LineConnector_2.minDistance = LineConnector_2.maxDistance; -// } -// -// private void FixedUpdate() -// { -// // BindRod(); -// LineWaterDisplacement(); -// } -// -// private void BindRod() -// { -// if (!Rod || !Rod.Asset) return; -// LineConnector_0.transform.position = Rod.Asset.lineConnector.position; -// } -// -// private void LineWaterDisplacement() -// { -// if (!waterPlane) -// { -// return; -// } -// -// for (int i = 0; i < obiRopeSegment_1.activeParticleCount; i++) -// { -// if (obiRopeSegment_1.GetParticlePosition(i).y < waterPlane.position.y) -// { -// // obiRopeSegment_1.AddForceParticle(i, Vector3.up * 10f, ForceMode.Acceleration); -// } -// } -// } -// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs.meta b/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs.meta deleted file mode 100644 index 1f36243a0..000000000 --- a/Assets/Scripts/Fishing/New/View/Player/Tackle/FLineHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 331fde19f47e431092cf5bd57c7bcfe4 -timeCreated: 1766586159 \ No newline at end of file