Agent AdjustStat Method Delta Engine Documentation

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

public void AdjustStat(
	StatAdjustment adjustment
)
Remarks

Tests: CreepyTowers.Tests.AgentTests
Examples

2 unit tests call CreepyTowers.Agent.AdjustStat(CreepyTowers.Stats.StatAdjustment)
[Test, CloseAfterFirstFrame]
public void AdjustStatDownwards()
{
    creep.AdjustStat(new StatAdjustment("Hp", "", -50.0f));
    Assert.AreEqual(50.0f, creep.GetStatValue("Hp"));
}
[Test, CloseAfterFirstFrame]
public void AdjustStatUpwards()
{
    creep.AdjustStat(new StatAdjustment("Hp", "", -50.0f));
    creep.AdjustStat(new StatAdjustment("Hp", "", 20.0f));
    Assert.AreEqual(70.0f, creep.GetStatValue("Hp"));
}
See Also