public class InputManager : MonoBehaviour { private InputActions _inputActions; public event EventHandler OnMovementInput; public event EventHandler OnFireButtonPressed; private void Awake() { _inputActions = new InputActions(); _inputActions.Player.Movement.performed += ctx => OnMovementInput?.Invoke(ctx.ReadValue()); _inputActions.Player.Fire.performed += ctx => OnFireButtonPressed?.Invoke(); } private void OnEnable() { _inputActions.Enable(); } private void OnDisable() { _inputActions.Disable(); } }