Agent GetStatValue Method Delta Engine Documentation

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

public float GetStatValue(
	string attribute
)

Return Value

Type: Single
Remarks

Tests: CreepyTowers.Tests.AgentTests
Examples

6 unit tests call CreepyTowers.Agent.GetStatValue(System.String)
[Test]
public void InitialValues()
{
    Assert.AreEqual(100.0, creep.GetStatValue("Hp"));
    Assert.AreEqual(1.0, creep.GetStatPercentage("Hp"));
}
[Test]
public void ApplyBuff()
{
    creep.ApplyBuff(new BuffEffect("TestHpBuff"));
    Assert.AreEqual(304.0, creep.GetStatValue("Hp"));
    Assert.AreEqual(100.0, creep.GetStatBaseValue("Hp"));
    Assert.AreEqual(1.0, creep.GetStatPercentage("Hp"));
}
[Test, CloseAfterFirstFrame]
public void AdjustStatDownwards()
{
    creep.AdjustStat(new StatAdjustment("Hp", "", -50.0f));
    Assert.AreEqual(50.0f, creep.GetStatValue("Hp"));
}
See Also