Пример #1
0
 private void OnSelectionChanged(Selectable selectable)
 {
     if (selectable != null)
     {
         _canvasGroup.alpha        = 1f;
         _canvasGroup.interactable = true;
     }
     else
     {
         _canvasGroup.alpha        = 0f;
         _canvasGroup.interactable = false;
     }
 }
Пример #2
0
 public void Select(Selectable selectable)
 {
     _selectedObject = _selectedObject == selectable ? null : selectable;
     SelectionChanged?.Invoke(_selectedObject);
 }