public void OnToggleButtonClick() { if (!tweener.IsTransitioning) { if (tweener.IsOpen) { tweener.Close(); EventManager.Instance.PostEvent("SFX/UI/Store/TrayClose", EventAction.PlaySound, this); } else { tweener.Open(); EventManager.Instance.PostEvent("SFX/UI/Store/TrayOpen", EventAction.PlaySound, this); } } }
public override void DisableElement(bool hide) { isEnabled = false; if (hide) { isHidden = true; CanvasGroup canvasGroup = base.gameObject.AddComponent <CanvasGroup>(); canvasGroup.alpha = 0f; canvasGroup.blocksRaycasts = false; return; } if (openCloseTweener == null) { initOpenCloseTweener(); } if (openCloseTweener.IsOpen) { openCloseTweener.Close(); } setButtonsEnabled(isEnabled: false); }