Projectile2DTests CreateProjectile Method Delta Engine Documentation

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

public void CreateProjectile()
Examples

[Test, CloseAfterFirstFrame]
public void CreateProjectile()
{
    var bulletImpulse = new Vector2D(0.3f, 0.3f);
    const int BulletDamage = 10;
    var bullet = CreateBullet(bulletImpulse, BulletDamage);
    Assert.IsTrue(bullet.Get<PhysicsBody>().LinearVelocity.IsNearlyEqual(bulletImpulse / 1000000f));
    Assert.AreEqual(BulletDamage, bullet.Damage);
}
See Also