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/InputHandler.cs | |
| parent | 5b955377fd4aae7cb24c2b16c15fe3ba20ceae8a (diff) | |
小写一点
Diffstat (limited to 'Assets/Scripts/InputHandler.cs')
| -rw-r--r-- | Assets/Scripts/InputHandler.cs | 16 |
1 files changed, 3 insertions, 13 deletions
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; + } /// <summary> @@ -58,15 +56,7 @@ namespace DS /// </summary> private void FixedUpdate() { - float delta = Time.fixedDeltaTime; // 固定时间步长,确保物理一致性 - - if (_cameraHandler != null) - { - // 让相机跟随目标(通常是玩家角色) - _cameraHandler.FollowTarget(delta); - // 根据鼠标/摇杆输入旋转相机 - _cameraHandler.HandleCameraRotation(delta, mouseX, mouseY); - } + } /// <summary> |
