Controller IsFallingFast Property Delta Engine Documentation

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

public bool IsFallingFast { get; set; }

Property Value

Type: Boolean
Remarks

Tests: Blocks.Tests.ControllerTests
Examples

2 unit tests call Blocks.Controller.IsFallingFast
[Test, CloseAfterFirstFrame]
public void DropSlowAffixesBlocksSlowly()
{
    controller.IsFallingFast = false;
    controller.FallingBlock = new Block(displayMode, content, Vector2D.One);
    controller.UpcomingBlock = new Block(displayMode, content, Vector2D.One);
    AdvanceTimeAndUpdateEntities(0.1f);
    Assert.AreEqual(0, CountBricks(grid));
    AdvanceTimeAndUpdateEntities(1.5f);
    Assert.AreEqual(0, CountBricks(grid));
    AdvanceTimeAndUpdateEntities(9.0f);
    Assert.AreEqual(4, CountBricks(grid), 1);
}
[Test, CloseAfterFirstFrame]
public void DropFastAffixesBlocksQuickly()
{
    controller.IsFallingFast = true;
    controller.FallingBlock = new Block(displayMode, content, Vector2D.One);
    controller.UpcomingBlock = new Block(displayMode, content, Vector2D.One);
    Assert.AreEqual(0, CountBricks(grid));
    AdvanceTimeAndUpdateEntities(2.5f);
    Assert.GreaterOrEqual(CountBricks(grid), 4);
}
See Also