Example #1
0
 public ClampedAttribute(AttributeName attributeName, float baseValue, float minValue, float maxValue,
                         float levelIncrement, LevelIncrementType levelIncrementType) : base(attributeName, baseValue,
                                                                                             levelIncrement, levelIncrementType)
 {
     this.minValue = minValue;
     this.maxValue = maxValue;
 }
Example #2
0
        public Attribute(
            AttributeName attributeName,
            float baseValue,
            float levelIncrement = 0.0f,
            LevelIncrementType levelIncrementType = LevelIncrementType.Percentage)
        {
            LevelIncrement     = levelIncrement;
            LevelIncrementType = levelIncrementType;
            AttributeName      = attributeName;
            BaseValue          = baseValue;
            _attributeLevel    = 1;
            IsDirty            = true;


            _attributeEffects      = new List <AttributeEffect>();
            _levelAttributeEffects = new Dictionary <int, AttributeEffect>();
        }
Example #3
0
        public Attribute(Attribute source)
        {
            LevelIncrement     = source.LevelIncrement;
            LevelIncrementType = source.LevelIncrementType;
            AttributeName      = source.AttributeName;
            _attributeLevel    = 1; //is leveled up by tower levelup
            BaseValue          = source.BaseValue;
            IsDirty            = true;

            _attributeEffects = new List <AttributeEffect>();

            source._attributeEffects.ForEach(effect =>
            {
                _attributeEffects.Add(new AttributeEffect(effect));
            });

            _levelAttributeEffects = new Dictionary <int, AttributeEffect>();
        }