Пример #1
0
 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 EnableElement()
 {
     isEnabled = true;
     setChildrenActive(isActive: true);
     if (isHidden)
     {
         isHidden = false;
         if (base.gameObject.GetComponent <CanvasGroup>() != null)
         {
             Object.Destroy(base.gameObject.GetComponent <CanvasGroup>());
         }
         return;
     }
     if (openCloseTweener == null)
     {
         initOpenCloseTweener();
     }
     if (!openCloseTweener.IsOpen)
     {
         openCloseTweener.Open();
     }
     setButtonsEnabled(isEnabled: true);
 }