Holds the individual bricks making up a block and handles rotating them
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
Blocks Block
Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Block type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Block | Initializes a new instance of the Block class |
Methods
Name | Description | |
---|---|---|
Add T | (Inherited from Entity.) | |
AddTag | (Inherited from Entity.) | |
ClearTags | (Inherited from Entity.) | |
Contains T | (Inherited from Entity.) | |
ContainsBehavior T | (Inherited from Entity.) | |
ContainsTag | (Inherited from Entity.) | |
Deactivate | (Inherited from Entity.) | |
Dispose | (Inherited from Entity.) | |
Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) | |
GetActiveBehaviors | (Inherited from Entity.) | |
GetComponentsForSaving | (Inherited from Entity.) | |
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
RotateAntiClockwise | ||
RotateClockwise | ||
Set | (Inherited from Entity.) | |
SetComponents | (Inherited from Entity.) | |
Start T | (Inherited from Entity.) | |
Stop T | (Inherited from Entity.) | |
ToString |
For debugging purposes the current brick can be displayed with ASCII characters.
View code on GitHub (Overrides Entity ToString .) | |
UpdateBrickDrawAreas |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) |
Properties
Name | Description | |
---|---|---|
Bricks | ||
Center | ||
IsActive | (Overrides Entity IsActive.) | |
IsPauseable | (Inherited from Entity.) | |
Left | ||
NumberOfComponents | (Inherited from Entity.) | |
Top | ||
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void DoBricksSplitInHalfOnExit() { var content = new JewelBlocksContent(); Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull); content.DoBricksSplitInHalfWhenRowFull = true; Assert.IsTrue(content.DoBricksSplitInHalfWhenRowFull); }
[Test, CloseAfterFirstFrame] public void AreFiveBrickBlocksAllowed() { var content = new JewelBlocksContent(); Assert.IsTrue(content.AreFiveBrickBlocksAllowed); content.AreFiveBrickBlocksAllowed = false; Assert.IsFalse(content.AreFiveBrickBlocksAllowed); }
[Test, CloseAfterFirstFrame] public void DoBlocksStartInARandomColumn() { var content = new JewelBlocksContent(); Assert.IsFalse(content.DoBlocksStartInARandomColumn); content.DoBlocksStartInARandomColumn = true; Assert.IsTrue(content.DoBlocksStartInARandomColumn); }
See Also