Exemple #1
0
    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);
                }
            }
        }
    }
Exemple #2
0
 public void Pressed(ConsoleKeyInfo info)
 {
     _handler?.Invoke(this);
 }