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 |
public void Set(string text = null, float? size = null, float? leading = null, float? tracking = null, float? paragraphSpacing = null, TTextAlignment? alignement = null, float? wordWrap = null)
{
Text = text ?? Text;
Size = size ?? Size;
Leading = leading ?? Leading;
Tracking = tracking ?? Tracking;
ParagraphSpacing = paragraphSpacing ?? ParagraphSpacing;
Alignment = alignement ?? Alignment;
WordWrap = wordWrap ?? WordWrap;
}
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); }