Block ClassDelta Engine Documentation
Holds the individual bricks making up a block and handles rotating them View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    Blocks Block

Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public class Block : Entity

The Block type exposes the following members.

Constructors

  NameDescription
Public methodBlock
Initializes a new instance of the Block class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodRotateAntiClockwise
Public methodRotateClockwise
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToString
For debugging purposes the current brick can be displayed with ASCII characters. View code on GitHub
(Overrides Entity ToString .)
Public methodUpdateBrickDrawAreas
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Top
Properties

  NameDescription
Public propertyBricks
Public propertyCenter
Public propertyIsActive (Overrides Entity IsActive.)
Public propertyIsPauseable (Inherited from Entity.)
Public propertyLeft
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyTop
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

Tests: Blocks.Tests.BlocksContentTests
Examples

14 unit tests call Blocks.Block
[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