public SocialStat(string name, int value, int max, SocialStatType link) { this.StatName = name; this.StatBaseValue = value; this.StatMaxValue = max; this.Link = link; }
public SocialStat() { this.StatName = string.Empty; this.StatBaseValue = 0; this.StatMaxValue = 3; this.Link = SocialStatType.None; }
protected T CreateStat <T>(SocialStatType statType) where T : SocialStat { T stat = System.Activator.CreateInstance <T>(); SocialStatDic.Add(statType, stat); return(stat); }
public SocialStat GetStat(SocialStatType statType) { if (ContainStat(statType)) { return(SocialStatDic[statType]); } return(null); }
protected T CreateOrGetStat <T>(SocialStatType statType) where T : SocialStat { T stat = GetStat <T>(statType); if (stat == null) { stat = CreateStat <T>(statType); } return(stat); }
public bool ContainStat(SocialStatType statType) { return(SocialStatDic.ContainsKey(statType)); }
public T GetStat <T>(SocialStatType type) where T : SocialStat { return(GetStat(type) as T); }