This holds the value of a creep/tower statistic - eg. creep health, tower firing rate etc.
It can be adjusted (eg a creep loses health on being shot) or buffed/debuffed (eg a tower
increases firing rate due to being close to a booster tower)
View code on GitHub
Inheritance Hierarchy
CreepyTowers.Stats Stat
Namespace: CreepyTowers.Stats
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Stat type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Stat | Initializes a new instance of the Stat class |
Methods
Name | Description | |
---|---|---|
Adjust | ||
ApplyBuff | ||
RemoveBuff | ||
ToString | (Overrides Object ToString .) |
Properties
Name | Description | |
---|---|---|
BaseValue | ||
MaxValue | ||
Percentage | ||
Value |
Remarks
Examples
[Test] public void Constructor() { var effect = new StatAdjustment("Hp", "Armor", -50); Assert.AreEqual("Hp", effect.Attribute); Assert.AreEqual("Armor", effect.Resist); Assert.AreEqual(-50.0f, effect.Adjustment); }
[Test] public void ConstructedFromXml() { var effect = new StatAdjustment("TestAdjustment"); Assert.AreEqual("Hp", effect.Attribute); Assert.AreEqual("", effect.Resist); Assert.AreEqual(-100.0f, effect.Adjustment); }
[Test] public void Constructor() { Assert.AreEqual(100.0f, stat.BaseValue); }
See Also