diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-05-30 17:05:13 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-05-30 17:05:13 +0800 |
| commit | 14a01125a885ee4dbd2de6c1f57bbcd12ca12110 (patch) | |
| tree | 0d2ee7539c26a495132c9b7d8c1c4e5d87d7a19b /Assets/Scripts/PlayerLocomotion.cs | |
| parent | f33ad8a7aa7359653fd2d98a8645e01087637980 (diff) | |
完成动画中翻滚的绑定
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. 处理旋转(仅在允许旋转时执行) // ---------------------------------------------------------- |
