Level IsInsideLevelGrid Method Delta Engine Documentation

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

public bool IsInsideLevelGrid(
	Vector2D gridPosition
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.GameLogic.Tests.LevelTests
Examples

1 unit tests call DeltaEngine.GameLogic.Level.IsInsideLevelGrid(DeltaEngine.Datatypes.Vector2D)
[Test, CloseAfterFirstFrame]
public void TestIsInsideLevelGrid()
{
    var level = new MockLevel(new Size(3));
    Assert.IsTrue(level.IsInsideLevelGrid(new Vector2D(0, 0)));
    Assert.IsTrue(level.IsInsideLevelGrid(new Vector2D(1, 1)));
    Assert.IsTrue(level.IsInsideLevelGrid(new Vector2D(3, 3)));
    Assert.IsFalse(level.IsInsideLevelGrid(new Vector2D(-0.1f, -0.1f)));
    Assert.IsFalse(level.IsInsideLevelGrid(new Vector2D(3.1f, 3.1f)));
}
See Also