Esempio n. 1
0
        public OtherModifiersConfiguration()
        {
            XmlSerializationUtil.AssignDefaultValues(this);

            ModifiersOrder = new ModifiersCollection();
            ModifiersOrder.AddRange(Enum.GetValues(typeof(Modifier)).Cast <Modifier>());
        }
        public OtherModifiersConfiguration()
        {
            XmlSerializationUtil.AssignDefaultValues(this);

            ModifiersOrder = new ModifiersCollection();
            ModifiersOrder.AddRange(Enum.GetValues(typeof(Modifier)).Cast<Modifier>());
        }
Esempio n. 3
0
        public Stats(Character attachedCharacter)
        {
            character = attachedCharacter;
            baseStats = new Dictionary <StatIdentifier, CharacterStat>(Stats.All.Length);
            //modStats = new Dictionary<StatIdentifier, int>(Stats.All.Length);
            int defaultValue = 100;

            foreach (StatIdentifier stat in Stats.All)
            {
                baseStats.Add(stat, new CharacterStat(stat)
                {
                    Value = defaultValue
                });
                //modStats.Add(stat, defaultValue);
            }

            this.Set(StatIdentifier.HealthRegeneration, baseHealthRegen);
            this.Set(StatIdentifier.EnergyRegeneration, baseEnergyRegen);
            //this.Set(StatIdentifier.Power, 0);
            //this.Set(StatIdentifier.Armor, 0);

            Modifiers = new ModifiersCollection(this);
        }