Level GetAllTilesOfType Method Delta Engine Documentation

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

public List<Vector2D> GetAllTilesOfType(
	LevelTileType tileType
)

Return Value

Type: List Vector2D 
Remarks

Tests: DeltaEngine.GameLogic.Tests.LevelTests
Examples

1 unit tests call DeltaEngine.GameLogic.Level.GetAllTilesOfType(DeltaEngine.GameLogic.LevelTileType)
[Test, CloseAfterFirstFrame]
public void TestGetAllTilesOfType()
{
    var level = new MockLevel(new Size(2));
    level.SetTile(new Vector2D(0, 0), LevelTileType.SpawnPoint);
    level.SetTile(new Vector2D(0, 1), LevelTileType.SpawnPoint);
    level.SetTile(new Vector2D(1, 0), LevelTileType.ExitPoint);
    Assert.AreEqual(2, level.GetAllTilesOfType(LevelTileType.SpawnPoint).Count);
}
See Also