BouncyBallsTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    DeltaEngine.Physics2D.Tests BouncyBallsTests

Namespace: DeltaEngine.Physics2D.Tests
Assembly: DeltaEngine.Physics2D.Tests (in DeltaEngine.Physics2D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class BouncyBallsTests : TestWithMocksOrVisually

The BouncyBallsTests type exposes the following members.

Constructors

  NameDescription
Public methodBouncyBallsTests
Initializes a new instance of the BouncyBallsTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Public methodSetUp
Public methodSimpleBouncingBalls
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test]
public void SimpleBouncingBalls()
{
    Rectangle viewport = ScreenSpace.Current.Viewport;
    physics.CreateEdge(viewport.BottomLeft, viewport.BottomRight);
    physics.CreateEdge(viewport.BottomLeft, viewport.TopLeft);
    physics.CreateEdge(viewport.TopRight, viewport.BottomRight);
    physics.CreateEdge(viewport.TopLeft, viewport.TopRight);
    CreateThreeBouncyBalls();
    new Command(OnPressing).Add(new MouseButtonTrigger(State.Pressing));
    new Command(OnPressed).Add(new MouseButtonTrigger(State.Pressed));
    new Command(OnReleasing).Add(new MouseButtonTrigger(State.Releasing));
}
See Also