TowerTargetFinderTests ConeAttackIncludesCreepsWithinAngle 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 ConeAttackIncludesCreepsWithinAngle()
Examples

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