Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering2D Entity2D
DeltaEngine.Rendering2D.Shapes Grid2D
Namespace: DeltaEngine.Rendering2D.Shapes
Assembly: DeltaEngine.Rendering2D.Shapes (in DeltaEngine.Rendering2D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Grid2D type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Grid2D | Initializes a new instance of the Grid2D class |
Methods
Extension Methods
Name | Description | |
---|---|---|
AffixToPhysics | (Defined by Entity2DPhysicsExtensions.) | |
StartBouncingOffScreenEdges | (Defined by Entity2DExtensions.) | |
StartFalling | (Defined by Entity2DExtensions.) | |
StartMoving | (Defined by Entity2DExtensions.) | |
StartRotating | (Defined by Entity2DExtensions.) |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
Alpha | (Inherited from Entity2D.) | |
Center | (Inherited from Entity2D.) | |
Color | (Inherited from Entity2D.) | |
DidFootprintChange | (Inherited from Entity2D.) | |
Dimension | ||
DrawArea | (Inherited from Entity2D.) | |
GridScale | ||
IsActive | (Overrides DrawableEntity IsActive.) | |
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
LastColor | (Inherited from Entity2D.) | |
LastDrawArea | (Inherited from Entity2D.) | |
NumberOfComponents | (Inherited from Entity.) | |
RenderLayer | (Inherited from DrawableEntity.) | |
Rotation | (Inherited from Entity2D.) | |
RotationCenter | (Inherited from Entity2D.) | |
Size | (Inherited from Entity2D.) | |
TopLeft | (Inherited from Entity2D.) | |
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test] public void RenderQuadraticGridWithSizeOfOne() { var grid = new Grid2D(new Size(2), Vector2D.Half); AssertQuadraticGrid(2, grid); foreach (var line in grid.lines) Assert.IsTrue(line.IsActive); }
[Test] public void RenderQuadraticGridWithSizeOfTen() { var grid = new Grid2D(new Size(10), Vector2D.Half, 0.05f); AssertQuadraticGrid(10, grid); }
[Test, CloseAfterFirstFrame] public void InactivatingInactivatesLines() { var grid = new Grid2D(new Size(2), Vector2D.Half); grid.IsActive = false; foreach (var line in grid.lines) Assert.IsFalse(line.IsActive); }
See Also