Stat ApplyBuff Method Delta Engine Documentation

Namespace: CreepyTowers.Stats
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public void ApplyBuff(
	BuffEffect effect
)
Remarks

Tests: CreepyTowers.Tests.Stats.StatTests
Examples

2 unit tests call CreepyTowers.Stats.Stat.ApplyBuff(CreepyTowers.Stats.BuffEffect)
[Test]
public void AddBuff()
{
  stat.ApplyBuff(new BuffEffect("TestHpBuff"));
    Assert.AreEqual(304.0f, stat.Value);
    Assert.AreEqual(304.0f, stat.MaxValue);
}
[Test]
public void RemoveBuff()
{
    stat.ApplyBuff(new BuffEffect("TestHpBuff"));
    stat.RemoveBuff(new BuffEffect("TestHpBuff"));
    Assert.AreEqual(100.0f, stat.Value);
    Assert.AreEqual(100.0f, stat.MaxValue);
}
See Also