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