Пример #1
0
        public void Show()
        {
            _soundController.PlayChatBubbleSound();

            if (_tweener != null)
            {
                _tweener.Kill();
                _tweener = null;
            }

            transform.localScale = new Vector3(0, 0, 1);
            CanvasGroup.alpha    = 1;
            _tweener             = DOTween.Sequence();
            _tweener.Append(transform.DOScale(new Vector3(1, 1, 1), BubbleShowTime))
            .AppendInterval(BubbleStayTime)
            .Append(CanvasGroup.DOFade(0, BubbleHideTime))
            .OnComplete(() => Destroy(gameObject));
            _tweener.Play();
        }