Namespace: DeltaEngine.GameLogic
Assembly: DeltaEngine.GameLogic (in DeltaEngine.GameLogic.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.GameLogic.Tests.LevelTests
1 unit tests call DeltaEngine.GameLogic.Level.GetWorldCoordinates(DeltaEngine.Datatypes.Vector2D)
Assembly: DeltaEngine.GameLogic (in DeltaEngine.GameLogic.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- mapCoordinates
- Type: DeltaEngine.Datatypes Vector2D
Return Value
Type: Vector2DRemarks
Examples
[Test, CloseAfterFirstFrame] public void ConvertMapCoordinatesToWorldCoordinates() { var level = new Level(new Size(3, 5)); level.RenderIn3D = true; Assert.AreEqual(new Vector2D(0, 0), level.GetWorldCoordinates(new Vector2D(1, 2))); Assert.AreEqual(new Vector2D(-1, 2), level.GetWorldCoordinates(new Vector2D(0, 0))); Assert.AreEqual(new Vector2D(1, 2), level.GetWorldCoordinates(new Vector2D(2, 0))); Assert.AreEqual(new Vector2D(-1, -2), level.GetWorldCoordinates(new Vector2D(0, 4))); Assert.AreEqual(new Vector2D(1, -2), level.GetWorldCoordinates(new Vector2D(2, 4))); }
See Also