TowerTests CreateTowerAtClickedPosition Method Delta Engine Documentation

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

public void CreateTowerAtClickedPosition()
Examples

[Test]
public void CreateTowerAtClickedPosition()
{
    var floor = new Plane(Vector3D.UnitY, 0.0f);
    new Command(pos =>
    { //ncrunch: no coverage start 
        var ray = Camera.Current.ScreenPointToRay(ScreenSpace.Current.ToPixelSpace(pos));
        var position = floor.Intersect(ray).Value;
        new Tower(TowerType.Water, position); //ncrunch: no coverage end
    }).Add(new MouseButtonTrigger(MouseButton.Left, State.Releasing));
}
See Also