Example #1
0
    IEnumerator ShowAnotherItem(bool showNext)
    {
        yield return(new WaitForSeconds(.4f));

        if (showNext)
        {
            if (shop)
            {
                shop.ShowNextItem(false);
            }
            else
            {
                about.ChangeTutImage(true);
            }
        }
        else
        {
            if (shop)
            {
                shop.ShowPrevItem(false);
            }
            else
            {
                about.ChangeTutImage(false);
            }
        }

        rectTransform.position = showNext ? startPos + new Vector2(Screen.width * 2, 0) : startPos + new Vector2(-Screen.width * 2, 0);
        StartCoroutine(SmoothSwipe(startPos));
    }