修改动画回调事件

This commit is contained in:
2026-03-11 09:06:24 +08:00
parent 1f1c603489
commit 40b142235e
9 changed files with 145 additions and 96 deletions

View File

@@ -85,7 +85,7 @@ namespace NBF
_IK = GetComponent<PlayerIK>();
_isInit = true;
}
public void OnUnUseItem()
{
@@ -152,10 +152,14 @@ namespace NBF
/// </summary>
public void OnRodThrowStart()
{
// if (Player.State is PlayerStateThrow playerStateThrow)
// {
// playerStateThrow.OnRodThrowStart();
// }
if (Player.State == PlayerState.Throw)
{
var playerStateView = Player.GetComponent<PlayerStateView>();
if (playerStateView.CurrentStateView is PlayerStageViewThrow playerStateThrow)
{
playerStateThrow.OnRodThrowStart();
}
}
}
/// <summary>
@@ -163,10 +167,14 @@ namespace NBF
/// </summary>
public void OnRodThrownEnd()
{
// if (Player.Fsm.CurrentState is PlayerStateThrow playerStateThrow)
// {
// playerStateThrow.OnRodThrownEnd();
// }
if (Player.State == PlayerState.Throw)
{
var playerStateView = Player.GetComponent<PlayerStateView>();
if (playerStateView.CurrentStateView is PlayerStageViewThrow playerStateThrow)
{
playerStateThrow.OnRodThrownEnd();
}
}
}
#endregion