Actor IsColliding Method Delta Engine Documentation

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

bool IsColliding(
	Actor other
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.GameLogic.Tests.ActorTests
Examples

2 unit tests call DeltaEngine.GameLogic.Actor.IsColliding(DeltaEngine.GameLogic.Actor)
[Test]
public void TestIfTwoActorsAreCollidingIn3D()
{
    var actor1 = new MockActor(Vector3D.One, 1.0f);
    var actor2 = new MockActor(Vector3D.Zero, 0.0f);
    Assert.IsTrue(actor1.IsColliding(actor2));
}
[Test]
public void TestIfTwoActorsAreCollidingIn2D()
{
    var actor1 = new MockActor(Vector2D.One, 0.0f, Vector2D.One);
    var actor2 = new MockActor(Vector2D.Zero, 0.0f, Vector2D.One);
    Assert.IsTrue(actor1.IsColliding(actor2));
}
See Also