Exemplo n.º 1
0
 private void Update()
 {
     if (gTween.effectActive)
     {
         float tweenVal = gTween.DoTween();
         if (gTween.effectActive)
         {
             myRect.sizeDelta = new Vector2(myRect.rect.width, targetHeight * tweenVal);
         }
         else
         {
             if (gTween.doReverse)
             {
                 OnClose();
                 targetHeight = 0f;
             }
             myRect.sizeDelta = new Vector2(myRect.rect.width, targetHeight);
         }
     }
 }
Exemplo n.º 2
0
 private void Update()
 {
     if (gTween.effectActive)
     {
         float tweenVal = gTween.DoTween();
         if (gTween.effectActive)
         {
             myRect.anchoredPosition = new Vector2(originalAnchoredPosition.x - myRect.sizeDelta.x * vDirection.x + myRect.sizeDelta.x * tweenVal * vDirection.x,
                                                   originalAnchoredPosition.y - myRect.sizeDelta.y * vDirection.y + myRect.sizeDelta.y * tweenVal * vDirection.y);
         }
         else
         {
             if (gTween.doReverse)
             {
             }
             else
             {
                 myRect.anchoredPosition = originalAnchoredPosition;
             }
             OnEffectComplete.Invoke(gTween.doReverse);
         }
     }
 }