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; } }
public static Sprite LoadStatImage(IBaseStat statModel) { return(Resources.Load <Sprite>($"Icons/{statModel.Icon}")); }
public void AddStat(IBaseStat baseStat) { }