This is used to increase or decrease the value of a creep/tower statistic - either by
multiplying the base value or by adding to it
View code on GitHub
Inheritance Hierarchy
CreepyTowers.Stats Buff
Namespace: CreepyTowers.Stats
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Buff type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | Buff | Initializes a new instance of the Buff class |
Properties
Name | Description | |
---|---|---|
![]() | Effect | |
![]() | Elapsed | |
![]() | IsExpired | |
![]() | Stat |
Remarks
Examples
[Test] public void SettingsConstructor() { var goldBuff = new BuffEffect("TestGoldBuff"); Assert.AreEqual("Gold", goldBuff.Attribute); Assert.AreEqual(2.0f, goldBuff.Multiplier); Assert.AreEqual(-3.0f, goldBuff.Addition); Assert.AreEqual(5.0f, goldBuff.Duration); }
[Test] public void Constructor() { var stat = new Stat(100.0f); var effect = new BuffEffect("TestGoldBuff"); var buff = new Buff(stat, effect); Assert.AreEqual(stat, buff.Stat); Assert.AreEqual(effect, buff.Effect); Assert.AreEqual(0, buff.Elapsed); }
[Test] public void Properties() { var stat = new Stat(100.0f); const float Elapsed = 4.0f; var effect = new BuffEffect("TestGoldBuff"); var buff = new Buff(new Stat(0.0f), new BuffEffect("TestHpBuff")) { Stat = stat, Effect = effect, Elapsed = Elapsed }; Assert.AreEqual(stat, buff.Stat); Assert.AreEqual(effect, buff.Effect); Assert.AreEqual(Elapsed, buff.Elapsed); }
See Also