From 364bd0db3dba9a0cc80f76cb465d80209922557f Mon Sep 17 00:00:00 2001 From: SmallFox <2806143047@qq.com> Date: Tue, 2 Jun 2026 20:02:14 +0800 Subject: 小写一点 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/InputHandler.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'Assets/Scripts/InputHandler.cs') diff --git a/Assets/Scripts/InputHandler.cs b/Assets/Scripts/InputHandler.cs index 9f57c20..4ddc48a 100644 --- a/Assets/Scripts/InputHandler.cs +++ b/Assets/Scripts/InputHandler.cs @@ -32,7 +32,6 @@ namespace DS public bool rollFlag; public bool sprintFlag; public float rollInputTimer; - public bool isInteracting; [Header("其他操作输入")] [Tooltip("翻滚是否触发")] @@ -40,7 +39,7 @@ namespace DS // ===== 私有引用与输入缓存 ===== private PlayerControls _inputActions; // 新输入系统生成的 PlayerControls 实例 - private CameraHandler _cameraHandler; // 相机处理器单例引用 + private Vector2 _movementInput; // 缓存移动输入值 (x => 水平, y => 垂直) private Vector2 _cameraInput; // 缓存视角输入值 (x => 水平视角, y => 垂直视角) @@ -49,8 +48,7 @@ namespace DS private void Start() { - // 获取相机处理器的单例引用,用于在 FixedUpdate 中驱动相机跟随与旋转 - _cameraHandler = CameraHandler.singleton; + } /// @@ -58,15 +56,7 @@ namespace DS /// private void FixedUpdate() { - float delta = Time.fixedDeltaTime; // 固定时间步长,确保物理一致性 - - if (_cameraHandler != null) - { - // 让相机跟随目标(通常是玩家角色) - _cameraHandler.FollowTarget(delta); - // 根据鼠标/摇杆输入旋转相机 - _cameraHandler.HandleCameraRotation(delta, mouseX, mouseY); - } + } /// -- cgit