Ejemplo n.º 1
0
 public void OnButtonEnter(SelectableButton selectable)
 {
     ResetButtons();
     if (_selectedButton != null && _selectedButton == selectable)
     {
         return;
     }
     selectable.ButtonImage.color = _hoverColor;
     selectable.ChangeInImageColor(_spriteHoverColor);
 }
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);
    }