private void FindLevelInputHandler() { InputHandler[] inputHandlers = FindObjectsOfType<InputHandler>(); for (int i = 0; i < inputHandlers.Length; i++) { if (i > 0) Destroy(inputHandlers[i].gameObject); else { _inputHandler = inputHandlers[i]; _inputHandler.Activate(); } } }
public void Activate(bool isActive) { _isActive = isActive; _inputHandler.Activate(isActive); }