Пример #1
0
 void OnMouseUp()
 {
     if (gameObject.activeSelf)
     {
         scroll.AnimateClose();
         Scroll.DeactivateClickedScroll();
     }
 }
Пример #2
0
    void OnMouseUp()
    {
        if (!StarManager.Instance.IsPlaying)
        {
            return;
        }

        if (clickedScroll != this)
        {
            DeactivateClickedScroll();
            // open scroll
            sprite.color  = activeColor;
            clickedScroll = this;
            openedScroll.Open();
        }
        else
        {
            // close
            sprite.color  = Color.white;
            clickedScroll = null;
            openedScroll.AnimateClose();
        }
    }