using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class StatsLine : MonoBehaviour { public Text statName; public Text statValue; public void SetStatName(string value) { statName.text = value; } public void SetStatValue(string value) { statValue.text = value; } public void SetStatValue(int value) { statValue.text = value.ToString(); } public string GetName() { return statName.text; } public string GetValue() { return statValue.text; } public int GetIntValue() { Int32.TryParse(statValue.text, out int returnValue); return returnValue; } public void MakeBold() { statName.fontStyle = FontStyle.Bold; statValue.fontStyle = FontStyle.Bold; } public void UnBold() { statName.fontStyle = FontStyle.Normal; statValue.fontStyle = FontStyle.Normal; } public void SetLocalizationKey(string key) { statName.GetComponent().key = key; } public void RemoveLocalization() { TextLocalization tl = statName.GetComponent(); Destroy(tl); } }