Beispiel #1
0
        public void Show(RankKind kind)
        {
            if (!initialized)
            {
                Init();
            }

            shownKind.Value = kind;
            switch (kind)
            {
            case RankKind.Draft1:
                categoryImage.sprite = draft1;
                break;

            case RankKind.Draft2:
                categoryImage.sprite = draft2;
                break;

            case RankKind.Draft3:
                categoryImage.sprite = draft3;
                break;

            case RankKind.AllDrafts:
                categoryImage.sprite = allDrafts;
                break;
            }
            gameObject.SetActive(true);
            focusManager.OnEnter();

            BgImage.color   = bgColor * new Color(1, 1, 1, 0);
            bodyGroup.alpha = 0;
            bodyGroup.transform.SetLocalX(100);
            leftGroup.alpha = 0;
            leftGroup.transform.SetLocalX(-100);

            DOTween.Sequence()
            .Append(BgImage.DOColor(bgColor, enterDuration).SetEase(Ease.Linear))
            .Join(bodyGroup.DOFade(1, enterDuration).SetEase(Ease.Linear))
            .Join(bodyGroup.transform.DOLocalMoveX(0, enterDuration).SetEase(Ease.OutQuint))
            .Join(leftGroup.DOFade(1, enterDuration).SetEase(Ease.Linear))
            .Join(leftGroup.transform.DOLocalMoveX(0, enterDuration).SetEase(Ease.OutQuint));

            exitButton.OnEnter();
        }