Esempio n. 1
0
            protected override void OnUpdateAnimations(float showLerp, bool showing)
            {
                _backer.color = ColorUtils.SetAlpha(_backer.color, _backerAlphaCurve.Evaluate(showLerp));

                if (_content != null)
                {
                    _content.color = ColorUtils.SetAlpha(_content.color, _contentAlphaCurve.Evaluate(showLerp));
                }

                RectTransformUtils.SetWidth(_rectTransform, Mathf.Lerp(_hiddenSize.x, _size.x, _widthCurve.Evaluate(showLerp)));
                RectTransformUtils.SetHeight(_rectTransform, Mathf.Lerp(_hiddenSize.y, _size.y, _heightCurve.Evaluate(showLerp)));
            }
 private void UpdateWidth()
 {
     RectTransformUtils.SetWidth(_textMesh.rectTransform, _textMesh.preferredWidth);
 }