Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - venetasoft

Pages: [1]
1
My mistake was not to add .SetRelative(True)

http://dotween.demigiant.com/documentation.php?api=SetRelative

Thanks Daniele for the super quick support !!!
 

2
Hi,
  I use DOOffset() to scroll a Texture, but only the first call succeeds, others don't give errors, but the Texture does not move..

What am I missing... ?

void Spin(int spinNum, Ease ease)
{
        var tween = GetComponent<Renderer>().material.DOOffset(new Vector2(0, 1), 1f);
        tween.SetEase(ease);

        //loop completed:
        tween.OnComplete(() =>
        {
            spinNum--;

            if (spinNum >= 1)
                Spin(spinNum, ease); //next spin loop
           else
                IsSpinning = false; //finished !!
        });
}

I tried with a For loop but with the same result, only the first call get executed, the others seems to be ignored..

IEnumerable Spin(int spinNum, Ease ease)
{
  for (int i = 0; i < spinNum; i++)
  {   
    tween = GetComponent<Renderer>().material.DOOffset(new Vector2(0, 1), 1f);
    tween.SetEase(ease);

    yield return new WaitForSeconds(1f);
  }
}

I shared a complete small demo here:
https://onedrive.live.com/redir?resid=150B61C7D2D5A9BA!471158&authkey=!AFMymBYFnKNhMQw&ithint=file%2c7z


Please help.

Thanks a lot.
David

Pages: [1]