diff options
| author | SmallFox <2806143047@qq.com> | 2026-06-02 20:02:14 +0800 |
|---|---|---|
| committer | SmallFox <2806143047@qq.com> | 2026-06-03 21:12:19 +0800 |
| commit | 364bd0db3dba9a0cc80f76cb465d80209922557f (patch) | |
| tree | 138e414a8f1426307288af61d63c13a81f9b3033 /Assets/Scripts/PlayerLocomotion.cs | |
| parent | 5b955377fd4aae7cb24c2b16c15fe3ba20ceae8a (diff) | |
小写一点
Diffstat (limited to 'Assets/Scripts/PlayerLocomotion.cs')
| -rw-r--r-- | Assets/Scripts/PlayerLocomotion.cs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Assets/Scripts/PlayerLocomotion.cs b/Assets/Scripts/PlayerLocomotion.cs index e94099b..d513899 100644 --- a/Assets/Scripts/PlayerLocomotion.cs +++ b/Assets/Scripts/PlayerLocomotion.cs @@ -112,14 +112,7 @@ namespace DS // ============================================================ // 每帧更新(使用 Update 处理移动逻辑,因为需要与输入同步) // ============================================================ - private void Update() - { - float delta = Time.deltaTime; // 获取帧时间 - isSprinting = _inputHandler.b_Input; - UpdateCharacterMovement(delta); - HandleRollingAndSpringting(delta); - } // ============================================================ // 固定更新(当前未使用,但保留以备未来物理相关逻辑) @@ -177,14 +170,11 @@ namespace DS // ============================================================ // 角色移动更新(核心逻辑) // ============================================================ - private void UpdateCharacterMovement(float delta) + public void UpdateCharacterMovement(float delta) { if (_inputHandler.rollFlag) return; - // 处理输入(读取水平/垂直输入值) - _inputHandler.TickInput(delta); - // ---------------------------------------------------------- // 1. 计算移动方向(基于摄像机朝向) // ---------------------------------------------------------- @@ -252,7 +242,7 @@ namespace DS } } - private void HandleRollingAndSpringting(float delta) + public void HandleRollingAndSpringting(float delta) { if (animatorHandler.animator.GetBool("isInteracting")) { |
