Exemplo n.º 1
0
        public void Update()
        {
            Stat stat = null;

            if (stats.TryGetValue(outputStat, out stat))
            {
                if (stat != lastValue)
                {
                    tmproText.text = stat.ToString();
                    lastValue      = stat;
                }
            }
        }
Exemplo n.º 2
0
        private void Start()
        {
            stats     = GetComponentInParent <StatBlock>();
            tmproText = GetComponentInChildren <TextMeshProUGUI>();

            Stat stat = null;

            if (stats.TryGetValue(outputStat, out stat))
            {
                tmproText.text = stat.ToString();
                lastValue      = stat;
            }
        }