public void Focus(bool val) { if (mIsFocused == val) return; if (IsLocked) { Debug.LogError("locked."); return; } mIsFocused = val; _animator.SetTrigger(val ? "Focus" : "Defocus"); }
public void OnLevelSelected(LevelButton button) { if (_selectedButton) { _selectedButton.Focus(false); _animator.SetTrigger("HideDifficulty"); } _selectedButton = button; _selectedButton.Focus(true); _animator.SetTrigger("ShowDifficulty"); }