Exemple #1
0
        public void Init(IBaseStat baseStat, Sprite sprite)
        {
            StatModel = baseStat;

            Text.text    = $"{StatModel.Title}";
            Image.sprite = sprite;

            if (baseStat is StatModel statModel)
            {
                UpdateValue(statModel.Value);
                StatType = statModel.StatType;

                statModel.OnValueChange += StatModel_OnValueChange;
            }
        }
Exemple #2
0
 public static Sprite LoadStatImage(IBaseStat statModel)
 {
     return(Resources.Load <Sprite>($"Icons/{statModel.Icon}"));
 }
Exemple #3
0
 public void AddStat(IBaseStat baseStat)
 {
 }