From 8537159642af167feae6f64d0614252f6016a54e Mon Sep 17 00:00:00 2001
From: SmallFox <2806143047@qq.com>
Date: Tue, 2 Jun 2026 19:38:24 +0800
Subject: 冲刺
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Assets/Scripts/AnimatorHandler.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'Assets/Scripts/AnimatorHandler.cs')
diff --git a/Assets/Scripts/AnimatorHandler.cs b/Assets/Scripts/AnimatorHandler.cs
index 775ffc4..157b78f 100644
--- a/Assets/Scripts/AnimatorHandler.cs
+++ b/Assets/Scripts/AnimatorHandler.cs
@@ -55,7 +55,7 @@ namespace DS
///
/// 垂直方向的移动输入(前进/后退),范围 -1 ~ 1
/// 水平方向的移动输入(左移/右移),范围 -1 ~ 1
- public void UpdateAnimatorValues(float verticalMovement, float horizontalMovement)
+ public void UpdateAnimatorValues(float verticalMovement, float horizontalMovement,bool isSprinting)
{
#region Vertical — 垂直方向(前进/后退)的动画参数处理
@@ -114,6 +114,12 @@ namespace DS
}
#endregion
+
+ if (isSprinting)
+ {
+ v = 2;
+ h = horizontalMovement;
+ }
// 将计算后的参数值设置到 Animator 中
// 第三个参数 dampTime 为 0.1f,表示在 0.1 秒内平滑过渡到目标值
--
cgit