Exemplo n.º 1
0
 public IEnumerator FadeIn(float fadeTime)
 {
     pulser.enabled      = false;
     button.interactable = true;
     alphaTween.Tween(0, 1, fadeTime);
     positionTween.Tween(rectTransform.anchoredPosition + new Vector2(0, -20), rectTransform.anchoredPosition, fadeTime, new AnimationCurve(new Keyframe[] { new Keyframe(0, 0, 3.14f, 3.14f), new Keyframe(1, 1, 0, 0) }));
     while (alphaTween.tweening || positionTween.tweening)
     {
         if (alphaTween.tweening)
         {
             alphaTween.Loop();
         }
         if (positionTween.tweening)
         {
             positionTween.Loop();
         }
         yield return(null);
     }
     pulser.enabled = true;
 }
Exemplo n.º 2
0
    public void ScrollToBottom(float time = 2f)
    {
        Vector2 targetScroll = new Vector2(scrollRect.content.anchoredPosition.x, scrollRect.content.sizeDelta.y - paperBottomOffset);

        tween.Tween(scrollRect.content.anchoredPosition, targetScroll, time, AnimationCurve.EaseInOut(0, 0, 1, 1));
    }