Moving some things over to the InputData system.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user