Exemplo n.º 1
0
        protected virtual void Repaint(InventoryCharacterStat stat)
        {
            if (stat == null || stat != player.characterCollection.GetStat(statCategory, statName))
                return;

            visualizer.Repaint(stat.currentValue, stat.maxValue);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Repaint a single stat.
        /// </summary>
        /// <param name="stat"></param>
        public virtual void RepaintStat(InventoryCharacterStat stat)
        {
            if (window.isVisible == false || statusRowPrefab == null || statusCategoryPrefab == null)
                return;

            foreach (var row in rowsPool)
            {
                if (row.statName.text == stat.statName)
                {
                    row.Repaint(stat.statName, stat.ToString());
                }
            }
        }
Exemplo n.º 3
0
        //public void NotifyStatsChanged()
        //{
        //    if (OnStatsChanged != null)
        //        OnStatsChanged(characterStats);

        //    RepaintStats();
        //}

        public void NotifyStatChanged(InventoryCharacterStat stat)
        {
            if (OnStatChanged != null)
                OnStatChanged(stat);

            RepaintStat(stat);
        }