LevelTests TilesOutsideOfTheGridAreNotInteractable Method Delta Engine Documentation

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

public void TilesOutsideOfTheGridAreNotInteractable()
Examples

[Test, CloseAfterFirstFrame]
public void TilesOutsideOfTheGridAreNotInteractable()
{
    var level = new Level(new Size(2, 2));
    level.RenderIn3D = true;
    level.SetTile(new Vector2D(0, 0), LevelTileType.Placeable);
    level.SetTile(new Vector2D(1, 0), LevelTileType.Placeable);
    level.SetTile(new Vector2D(0, 1), LevelTileType.Placeable);
    level.SetTile(new Vector2D(1, 1), LevelTileType.Placeable);
    Assert.IsFalse(level.IsTileInteractable(new Vector2D(-0.1f, 0)));
    Assert.IsFalse(level.IsTileInteractable(new Vector2D(0, -0.1f)));
    Assert.IsFalse(level.IsTileInteractable(new Vector2D(2.1f, 0)));
    Assert.IsFalse(level.IsTileInteractable(new Vector2D(0, 2.1f)));
}
See Also