Set() public method

public Set ( string text = null, float size = null, float leading = null, float tracking = null, float paragraphSpacing = null, TTextAlignment alignement = null, float wordWrap = null ) : void
text string
size float
leading float
tracking float
paragraphSpacing float
alignement TTextAlignment
wordWrap float
return void
示例#1
0
        void HealthChanged()
        {
            Color c;

            if (meState.health <= 25)
            {
                c = Color.red;
            }
            else if (meState.health <= 50)
            {
                c = new Color(1f, 0.5f, 36f / 255f);
            }
            else if (meState.health <= 75)
            {
                c = Color.yellow;
            }
            else
            {
                c = Color.green;
            }

            text.ColorBottomLeft           =
                text.ColorBottomRight      =
                    text.ColorTopLeft      =
                        text.ColorTopRight =
                            c;

            text.Set("HP " + meState.health);
        }
示例#2
0
        void Update()
        {
            // lock in middle of screen
            transform.position = Vector3.zero;

            // update timer
            if (me && meState != null)
            {
                if (meState.Dead)
                {
                    timer.Set(Mathf.Max(0, (meState.respawnFrame - BoltNetwork.frame) / BoltNetwork.framesPerSecond).ToString());
                }
                else
                {
                    timer.Set("");
                }
            }
            else
            {
                timer.Set("");
            }
        }