aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts/InputHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/InputHandler.cs')
-rw-r--r--Assets/Scripts/InputHandler.cs16
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>