From 14a01125a885ee4dbd2de6c1f57bbcd12ca12110 Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sat, 30 May 2026 17:05:13 +0800 Subject: 完成动画中翻滚的绑定 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/PlayerLocomotion.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Assets/Scripts/PlayerLocomotion.cs') 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. 处理旋转(仅在允许旋转时执行) // ---------------------------------------------------------- -- cgit