升级obi

This commit is contained in:
2026-01-22 22:08:21 +08:00
parent 120b8cda26
commit 20f14322bc
1067 changed files with 149894 additions and 29583 deletions

View File

@@ -43,14 +43,13 @@ public class RodLine : MonoBehaviour
return;
}
for (int i = 0; i < points.Length; i++)
for (var i = 0; i < points.Length; i++)
{
Transform transform = points[i];
if ((bool)transform)
var point = points[i];
if (point)
{
lineRenderer.SetPosition(i, transform.position);
lineRenderer.SetPosition(i, point.position);
}
}
}
}

View File

@@ -5,6 +5,7 @@ using UnityEngine;
public class Rope : MonoBehaviour
{
private FRod _rod;
public bool isFloatRope;
[SerializeField] private ObiRope rope;
[SerializeField] private ObiRopeCursor cursor;
@@ -16,9 +17,21 @@ public class Rope : MonoBehaviour
private void Awake()
{
rope = GetComponent<ObiRope>();
}
public void Init(FRod rod)
{
_rod = rod;
if (_rod)
{
LineLength_OnValueChanged(_rod.lineLength);
if (isFloatRope)
{
LineLength_OnValueChanged(_rod.floatLength);
}
else
{
LineLength_OnValueChanged(_rod.lineLength - _rod.floatLength);
}
}
}