//Creates the <T> Stat and adds it to the collection protected T CreateStat <T>(StatType statType) where T : Stat { T stat = Activator.CreateInstance <T>(); //Debug.Log("CREATING STAT OF TYPE " + statType + ": " + stat.ToString()); StatDict.Add(statType, stat); return(stat); }
//Check for stat in collection public bool ContainsStat(StatType statType) { return(StatDict.ContainsKey(statType)); }