Moving some things over to the InputData system.

This commit is contained in:
Dan Foster
2026-02-12 00:02:53 +00:00
parent 2abadf0b3e
commit 13ccde8e96
6 changed files with 142 additions and 261 deletions

View File

@@ -94,7 +94,7 @@ public class SimpleGun : MonoBehaviour
void Update()
{
// Shooting
if (isAutomatic ? Input.GetButton("Fire1") : Input.GetButtonDown("Fire1"))
if (isAutomatic ? InputData.leftMouseButton.down : InputData.leftMouseButton.pressed)
{
if (Time.time >= nextTimeToFire)
{
@@ -104,7 +104,7 @@ public class SimpleGun : MonoBehaviour
}
// Reload
if (Input.GetKeyDown(KeyCode.R))
if (InputData.reload.pressed)
Reload();
// Recover from recoil