Esempio n. 1
0
 public PlanetTemplate(int id, string name, int prob, NormalizedValueTemplate population,
                       NormalizedValueTemplate importance, LinearValueTemplate tax)
 {
     Id              = id;
     Name            = name;
     Probability     = prob;
     PopulationRange = population;
     ImportanceRange = importance;
     TaxRange        = tax;
 }
Esempio n. 2
0
 public Species(int id, string name, NormalizedValueTemplate strength,
                NormalizedValueTemplate dex, NormalizedValueTemplate con,
                NormalizedValueTemplate intl, NormalizedValueTemplate per,
                NormalizedValueTemplate ego, NormalizedValueTemplate cha,
                NormalizedValueTemplate psy, NormalizedValueTemplate atk,
                NormalizedValueTemplate mov, NormalizedValueTemplate siz,
                BodyTemplate bodyTemplate)
 {
     Id           = id;
     Name         = name;
     Strength     = strength;
     Dexterity    = dex;
     Perception   = per;
     Intelligence = intl;
     Ego          = ego;
     Charisma     = cha;
     Constitution = con;
     PsychicPower = psy;
     AttackSpeed  = atk;
     MoveSpeed    = mov;
     Size         = siz;
     BodyTemplate = bodyTemplate;
 }
Esempio n. 3
0
        private Dictionary <int, NormalizedValueTemplate> GetAttributeTemplates(IDbConnection connection)
        {
            Dictionary <int, NormalizedValueTemplate> attributeTemplateMap =
                new Dictionary <int, NormalizedValueTemplate>();
            IDbCommand command = connection.CreateCommand();

            command.CommandText = "SELECT * FROM AttributeTemplate";
            var reader = command.ExecuteReader();

            while (reader.Read())
            {
                int   id        = reader.GetInt32(0);
                float baseValue = (float)reader[1];
                float stdDev    = (float)reader[2];
                NormalizedValueTemplate attributeTemplate = new NormalizedValueTemplate
                {
                    BaseValue         = baseValue,
                    StandardDeviation = stdDev
                };

                attributeTemplateMap[id] = attributeTemplate;
            }
            return(attributeTemplateMap);
        }