Exemple #1
0
    private StatSet(StatDictionary stats) : this()
    {
        Dictionary <string, float> statStrings = stats.ToDictionary();

        this.stats = new Dictionary <StatTag, float>();
        foreach (var stat in statStrings)
        {
            StatTag result;
            if (Enum.TryParse(stat.Key, true, out result))
            {
                this.stats[result] = stat.Value;
            }
        }
    }
Exemple #2
0
 private StatSet(StatDictionary stats)
 {
     this.stats = stats.ToDictionary();
 }