接入新逻辑

# Conflicts:
#	Assets/Scenes/RopeTest.unity
#	Assets/Scripts/Fishing/New/View/Player/Tackle/FLine.cs
#	Assets/Scripts/Fishing/Rope/Rope.cs
#	Assets/Scripts/Fishing/Rope/Rope.cs.meta
This commit is contained in:
Bob.Song
2026-04-26 14:42:54 +08:00
parent 05fa2d6e5e
commit d432c468b1
48 changed files with 6150 additions and 6790 deletions

View File

@@ -13,7 +13,7 @@ namespace NBF
public struct ThrowAnimationRequest
{
public LureController Lure;
public FLineLogicNode Lure;
public Vector3 ThrowOriginPosition;
public Vector3 StartPosition;
public Vector3 Forward;

View File

@@ -22,7 +22,7 @@ namespace NBF
private float _castElapsedTime;
private Vector3 _castStartPos;
private Vector3 _castTargetPos;
private LureController _castingLure;
private FLineLogicNode _castingLure;
public bool IsPlaying => _castingLure != null;
@@ -51,7 +51,7 @@ namespace NBF
_chargedProgress = Mathf.Clamp01(request.ChargedProgress);
_castElapsedTime = 0f;
var lureBody = request.Lure.RBody;
var lureBody = request.Lure.Rigidbody;
_castStartPos = request.StartPosition;
Vector3 forward = GetHorizontalForward(request.Forward);
@@ -81,7 +81,7 @@ namespace NBF
return;
}
var lureBody = _castingLure.RBody;
var lureBody = _castingLure.Rigidbody;
if (snapToTarget)
{
_castingLure.transform.position = _castTargetPos;
@@ -150,4 +150,4 @@ namespace NBF
return position;
}
}
}
}

View File

@@ -101,9 +101,11 @@ namespace NBF
var handItemView = Player.HandItem.GetComponent<PlayerItemView>();
if (handItemView != null && handItemView.Rod != null)
{
if (handItemView.Rod.Line.PinchController != null)
var endNode = handItemView.Rod.Line.GetNode(FLineLogicNodeType.End);
var pinch = endNode.gameObject.GetComponent<JointPinchController>();
if (pinch != null)
{
handItemView.Rod.Line.PinchController.StartPinch(view.Unity.ModelAsset.Pinch);
pinch.StartPinch(view.Unity.ModelAsset.Pinch);
}
}
}
@@ -118,9 +120,12 @@ namespace NBF
var handItemView = Player.HandItem.GetComponent<PlayerItemView>();
if (handItemView != null && handItemView.Rod != null)
{
if (handItemView.Rod.Line.PinchController != null)
var endNode = handItemView.Rod.Line.GetNode(FLineLogicNodeType.End);
var pinch = endNode.gameObject.GetComponent<JointPinchController>();
if (pinch != null)
{
handItemView.Rod.Line.PinchController.ReleasePinch();
pinch.ReleasePinch();
;
}
}
}

View File

@@ -61,18 +61,19 @@ namespace NBF
PlayerView.Unity.ModelAsset.PlayerAnimator.StartThrow = false;
var rod = GetRod();
if (rod == null || rod.Line == null || rod.Line.Lure == null)
if (rod == null || rod.Line == null)
{
return;
}
var endNode = rod.Line.GetNode(FLineLogicNodeType.End);
_throwAnimation = CreateThrowAnimation(rod);
_throwAnimation.Player = Player;
_throwAnimation?.Play(new ThrowAnimationRequest
{
Lure = rod.Line.Lure,
Lure = endNode,
ThrowOriginPosition = PlayerView.Unity.transform.position,
StartPosition = rod.Line.Lure.RBody.position,
StartPosition = endNode.Rigidbody.position,
Forward = PlayerView.Unity.transform.forward,
ChargedProgress = ChargedProgress
});
@@ -108,4 +109,4 @@ namespace NBF
}
}
}
}
}