TowerTargetFinderTests RadiusAttackExcludesCreepsOutsideRange Method Delta Engine Documentation

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

public void RadiusAttackExcludesCreepsOutsideRange()
Examples

[Test, CloseAfterFirstFrame]
public void RadiusAttackExcludesCreepsOutsideRange()
{
    var tower = new Tower(TowerType.Slice, Vector3D.Zero);
    tower.RenderModel();
    var creep = CreateCreepOfType(CreepType.Cloth, Vector3D.UnitY);
    Assert.AreEqual(AttackType.Cone, tower.AttackType);
    var farCreep = CreateCreepOfType(CreepType.Cloth, new Vector3D(100, 100, 0));
    AdvanceTimeTillTowerAttacks(tower);
    Assert.IsTrue(tower.IsOnCooldown);
    Assert.Less(creep.GetStatPercentage("Hp"), 1);
    Assert.AreEqual(1, farCreep.GetStatPercentage("Hp"));
}
See Also