Exemplo n.º 1
0
        private void OnGUI()
        {
            if (_showCounter > 0)
            {
                _showCounter -= Time.deltaTime;

                var textColor    = Color.white;
                var outlineColor = Color.black;

                if (_showCounter <= 1)
                {
                    textColor.a    = _showCounter;
                    outlineColor.a = _showCounter;
                }

                ShadowAndOutline.DrawOutline(new Rect(40, 20, 600, 160), _shownLogText, new GUIStyle
                {
                    alignment = TextAnchor.UpperLeft,
                    fontSize  = 20
                }, outlineColor, textColor, 3f);
            }
        }
Exemplo n.º 2
0
        private void OnGUI()
        {
            if (_showCounter <= 0)
            {
                return;
            }

            var textColor    = Color.black;
            var outlineColor = Color.white;

            if (_showCounter <= 1)
            {
                textColor.a    = _showCounter;
                outlineColor.a = _showCounter;
            }

            ShadowAndOutline.DrawOutline(new Rect(40, 20, Screen.width - 80, 160), _shownLogText, new GUIStyle
            {
                alignment = TextAnchor.UpperLeft,
                fontSize  = 20
            }, textColor, outlineColor, 3);
        }