SpriteText.SetColor C# (CSharp) Method

SetColor() public method

Sets the text's color to the specified color. NOTE: Will not override color tags in the text itself.
public SetColor ( Color c ) : void
c Color Color to shade the text.
return void
	public void SetColor(Color c)
	{
		color = c;

		updateColors = true;
		Text = text;
	}

Usage Example

Exemplo n.º 1
0
    public void UpdateSlot(string name, string avatarIcon)
    {
        skillBG.transform.localScale    = Vector3.one;
        skillIcon.transform.localScale  = Vector3.one;
        pinzhiIcon.transform.localScale = Vector3.one;

        // Vertical text, so don't use [#FFFFFFFF]
        if (string.IsNullOrEmpty(name))
        {
            nameText.transform.parent.localScale = Vector3.zero;
        }
        else
        {
            nameText.transform.parent.localScale = Vector3.one;
            int   rarityLevel = 3;
            Color col         = GUIFontColor.ConvertColor(PackageUnit.GetItemDataNameColor(rarityLevel));
            nameText.Text = name;
            nameText.SetColor(col);
        }

        string icon = avatarIcon.Replace("Avatar", "");

        icon = "Big" + icon;
        portaitIcon.PlayAnim(icon);
    }
All Usage Examples Of SpriteText::SetColor