去掉obi,使用自写绳索

This commit is contained in:
2026-02-23 20:51:03 +08:00
parent cb636f862d
commit 91e2309eeb
2011 changed files with 2593 additions and 190578 deletions

View File

@@ -2,14 +2,14 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Obi;
// using Obi;
using UnityEngine;
namespace NBF
{
public class FLine : FGearBase
{
[SerializeField] private ObiParticleAttachment startParticleAttachment;
// [SerializeField] private ObiParticleAttachment startParticleAttachment;
[SerializeField] private bool isLureConnect;
[SerializeField] private RodLine rodLine;
[SerializeField] private Rope fishingRope;
@@ -31,7 +31,7 @@ namespace NBF
protected override void OnInit()
{
var tipRb = Rod.Asset.LineConnectorRigidbody;
startParticleAttachment.target = tipRb.transform;
// startParticleAttachment.target = tipRb.transform;
if (isLureConnect)
{
Lure.SetJoint(tipRb);
@@ -39,6 +39,7 @@ namespace NBF
}
else
{
fishingRope.startAnchor = tipRb;
Bobber.SetJoint(tipRb);
Lure.SetJoint(Bobber.rbody);
Lure.gameObject.SetActive(true);
@@ -78,15 +79,15 @@ namespace NBF
public void EnableLineRenderers()
{
foreach (ObiRopeExtrudedRenderer item in GetComponentsInChildren<ObiRopeExtrudedRenderer>().ToList())
{
item.enabled = true;
}
// foreach (ObiRopeExtrudedRenderer item in GetComponentsInChildren<ObiRopeExtrudedRenderer>().ToList())
// {
// item.enabled = true;
// }
}
public void SetObiRopeStretch(float value)
{
fishingRope.LineLength_OnValueChanged(value);
fishingRope.SetTargetLength(value);
}
}
}