diff options
Diffstat (limited to 'Assets/Scripts/PlayerLocomotion.cs')
| -rw-r--r-- | Assets/Scripts/PlayerLocomotion.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Assets/Scripts/PlayerLocomotion.cs b/Assets/Scripts/PlayerLocomotion.cs index 8b77c06..61eef1f 100644 --- a/Assets/Scripts/PlayerLocomotion.cs +++ b/Assets/Scripts/PlayerLocomotion.cs @@ -167,7 +167,16 @@ namespace DS // ---------------------------------------------------------- // 将玩家的移动量(0~1)传递给 Animator,用于混合行走/奔跑动画 animatorHandler.UpdateAnimatorValues(_inputHandler.moveAmount, 0); - + + // ---------------------------------------------------------- + // 5. 更新翻滚参数 + // ---------------------------------------------------------- + if (_inputHandler.rollTriggered) + { + animatorHandler.TriggerRoll(); + _inputHandler.rollTriggered = false; + } + // ---------------------------------------------------------- // 5. 处理旋转(仅在允许旋转时执行) // ---------------------------------------------------------- |
