Ejemplo n.º 1
0
        /// <summary>
        /// Constructs stats using default values.
        /// </summary>
        public StatsComponent()
        {
            this._stats = new Dictionary <StatID, float>();
            this._bonus = new Dictionary <StatID, float>();
            foreach (StatID statID in Enum.GetValues(typeof(StatID)))
            {
                DefaultStat stat = StatsPreloader.GetStatByID((int)statID);
                this._stats.Add(statID, stat.defaultVal);
                this._bonus.Add(statID, 0);
            }

            GD.PrintS(Enum.GetNames(typeof(StatID)).Length);
        }
Ejemplo n.º 2
0
 public static void Preload()
 {
     StatsPreloader.Preload(StatsPath);
 }