Files
Fishing2/Assets/Scripts/Fishing/New/View/Player/Tackle/FHook.cs
Bob.Song cf2e374998 修改
2026-03-10 16:03:38 +08:00

30 lines
922 B
C#

using UnityEngine;
namespace NBF
{
public class FHook : FGearBase
{
public HookAsset hookAsset;
private void Awake()
{
hookAsset = GetComponent<HookAsset>();
}
protected override void OnInit()
{
// transform.position = Rod.lineHandler.LineConnector_2.transform.position;
// transform.rotation = Rod.lineHandler.LineConnector_2.transform.rotation; // 确保旋转也同步
// SetParent(Rod.lineHandler.LineConnector_2.transform);
SetParent(Rod.Line.Lure.transform);
transform.localPosition = Vector3.zero;
// var target = lineHandler.LineConnector_2.GetComponent<Rigidbody>();
// var joint = Hook.gameObject.GetComponent<ConfigurableJoint>();
// joint.connectedBody = target;
}
}
}