去掉obi,使用自写绳索
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user