private void OnButtonPressed(Button b) { if (buttons != null) { foreach (Button button in buttons) { button.interactable = false; } for (int i = 0; i < buttons.Length; i++) { if (buttons[i].gameObject.Equals(b.gameObject)) { buttonPressedCallback?.Invoke(i); } } } }
public void Pressed(ConsoleKeyInfo info) { _handler?.Invoke(this); }