Namespace: CreepyTowers
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Tests: CreepyTowers.Tests.AgentTests
Tests: CreepyTowers.Tests.Towers.TowerTests
2 unit tests call CreepyTowers.Agent.GetStatPercentage(System.String)
1 unit tests call CreepyTowers.Agent.GetStatPercentage(System.String)
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- attribute
- Type: System String
Return Value
Type: SingleRemarks
Remarks
Examples
[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")); }
Examples
[Test, CloseAfterFirstFrame] public void CheckForCreepUnderAttack() { var tower = new Tower(TowerType.Slice, new Vector2D(0, 0)); tower.RenderModel(); var creep = new Creep(CreepType.Cloth, new Vector2D(1, 0)); new TowerTargetFinder(); AdvanceTimeAndUpdateEntities(2.1f); Assert.Less(creep.GetStatPercentage("Hp"), 1); }
See Also