private void Update() { if (Input.GetKeyDown(startKey)) { _testComponent?.StartTest(); } else if (Input.GetKeyDown(stopKey)) { _testComponent?.StopTest(); } }
private void Start() { _testComponent = GetComponent <ITester>(); _inputActions.Player.Suck.started += ctx => _testComponent?.StartTest(); _inputActions.Player.Suck.canceled += ctx => _testComponent?.StopTest(); }