Esempio n. 1
0
    protected void ToLeft()
    {
        Vector2 targetAnchorPos = RectTrans.anchoredPosition - Vector2.right * offset;

        RectTrans.DOAnchorPos(targetAnchorPos, UIEffectTime.SLIDE_FROM_Right).SetEase(Ease.Linear).OnComplete(() =>
        {
            if (OnExitComplete != null)
            {
                OnExitComplete();
            }
        });
    }
Esempio n. 2
0
 protected void FromLeft()
 {
     InitPos();
     offset = DefaultScreenWidth + RectTrans.sizeDelta.x;
     RectTrans.anchoredPosition = DefaultAnchorPos - Vector2.right * offset;
     RectTrans.DOAnchorPos(DefaultAnchorPos, UIEffectTime.SLIDE_FROM_Right).SetEase(Ease.Linear).OnComplete(() =>
     {
         if (onEnterComplete != null)
         {
             onEnterComplete();
         }
     });
 }