public void CloseUI(PlayerUIButtonType buttonType) { if (_isOpened && _buttonType == buttonType) { _isOpened = false; _animator.SetBool("isOpen", false); } }
public void OpenUI(string buttonText, string mainText, PlayerUIButtonType buttonType) { if (!_isOpened) { _isOpened = true; _buttonType = buttonType; _animator.SetBool("isOpen", true); _buttonText.text = buttonText; _mainText.text = mainText; } }