Ejemplo n.º 1
0
 public void OnButtonDeselected(SelectableButton selectable)
 {
     if (_cantBeUnselected && _selectedButton == selectable)
     {
         return;
     }
     selectable.Deselect();
     DeselectFunction(selectable);
     _selectedButton = null;
     ResetButtons();
 }
Ejemplo n.º 2
0
    public void OnButtonSelected(SelectableButton selectable)
    {
        //if (selectable.InteractableWhenSelected)

        if (_selectedButton != null)
        {
            _selectedButton.Deselect();
            DeselectFunction(_selectedButton);
            _selectedButton = null;
        }

        ResetButtons();

        _selectedButton = selectable;
        selectable.ButtonImage.color = _selectedColor;
        selectable.ChangeInImageColor(_spriteSelectedColor);
        selectable.Select();
        SelectFunction(selectable);
    }