Esempio n. 1
0
        /// <summary>
        /// 设置提示的文本内容。
        /// </summary>
        /// <param name="text">文本</param>
        /// <param name="isAutoDisappear">是否自动消失</param>
        public IEnumerator SetContent(string text, bool isAutoDisappear)
        {
            Content = text;
            if (isAutoDisappear)
            {
                mClickHandler.gameObject.SetActive(false);

                mBackGround.color           = new Color(255, 255, 255, 0);
                mContent.color              = new Color(255, 255, 255, 0);
                mContentOutLine.effectColor = new Color(0, 0, 0, 0);

                Sequence mySequence = DOTween.Sequence();

                var appearSequence = DOTween.Sequence();
                appearSequence.Join(mBackGround.DOFade(1f, 0.3f));
                appearSequence.Join(mContentOutLine.DOFade(1, 0.3f));
                appearSequence.Join(mContent.DOFade(1, 0.3f));
                appearSequence.Join(mTips.DOLocalMoveY(-100, 0f));
                appearSequence.Join(mTips.DOLocalMoveY(0, 0.3f));

                var disappearSequence = DOTween.Sequence();
                disappearSequence.Join(mBackGround.DOFade(0f, 0.5f));
                disappearSequence.Join(mContentOutLine.DOFade(0, 0.3f));
                disappearSequence.Join(mContent.DOFade(0, 0.3f));
                disappearSequence.Join(mTips.DOLocalMoveY(100, 0.5f));

                mySequence.Append(appearSequence);
                mySequence.AppendInterval(1f);
                mySequence.Append(disappearSequence);
                yield return(mySequence.WaitForCompletion());

                mController.Confirm();
            }
        }
Esempio n. 2
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        outline.DOFade(1, .3f);

        //currentSibling = transform.GetSiblingIndex();
        //transform.SetAsLastSibling();
    }
Esempio n. 3
0
    void Start()
    {
        image = GetComponent <Image>();

        outline = GetComponent <Outline>();
        outline.DOFade(0, 0);
    }
Esempio n. 4
0
        /// <summary>
        /// Creates and returns a Tween for the informed component.
        /// The Tween is configured based on the attribute values of this TweenData file.
        /// </summary>
        /// <param name="transform"></param>
        /// <returns></returns>
        public Tween GetTween(Outline outline)
        {
            switch (command)
            {
            case OutlineCommand.Color:
                return(outline.DOColor(color, duration));

            case OutlineCommand.Fade:
                return(outline.DOFade(to, duration));

            default:
                return(null);
            }
        }
Esempio n. 5
0
    public override Tween GetTween(UniTween.UniTweenTarget uniTweenTarget)
    {
        Outline outline = (Outline)GetComponent(uniTweenTarget);

        switch (command)
        {
        case OutlineCommand.Color:
            return(outline.DOColor(color, duration));

        case OutlineCommand.Fade:
            return(outline.DOFade(to, duration));

        default:
            return(null);
        }
    }