Used within a tilemap.
View code on GitHub
Namespace: DeltaEngine.Scenes.ControlsAssembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Tile type exposes the following members.
Properties
Name | Description | |
---|---|---|
Color | ||
Material |
Remarks
Examples
[Test, Category("Slow")] //ncrunch: no coverage start public void RenderColoredLogoTilemap() { CreateBorder(); var tilemap = new ColoredLogoTilemap(World, Map) { DrawArea = Center }; tilemap.Add(new FontText(Font.Default, "", new Rectangle(0.3f, 0.6f, 0.2f, 0.2f)) { HorizontalAlignment = HorizontalAlignment.Left, RenderLayer = 2 }); tilemap.Start<RenderDragInfo>(); }
[Test] public void TestWithMouseDrag() { var tilemap = new ColoredLogoTilemap(World, Map); tilemap.State.DragStart = new Vector2D(0.5f, 0.5f); tilemap.State.DragEnd = new Vector2D(0.7f, 0.9f); tilemap.Update(); Assert.IsTrue(tilemap.State.DragDelta.IsNearlyEqual(new Vector2D(0.2f, 0.4f))); }
[Test] public void TestWithMockKeyboard() { new ColoredLogoTilemap(World, Map); if (!IsMockResolver) return; //ncrunch: no coverage var keyboard = Resolve<MockKeyboard>(); keyboard.SetKeyboardState(Key.A, State.Pressed); AdvanceTimeAndUpdateEntities(); keyboard.SetKeyboardState(Key.D, State.Pressed); AdvanceTimeAndUpdateEntities(); keyboard.SetKeyboardState(Key.W, State.Pressed); AdvanceTimeAndUpdateEntities(); keyboard.SetKeyboardState(Key.S, State.Pressed); AdvanceTimeAndUpdateEntities(); }
See Also