Projectile2D Damage Property Delta Engine Documentation

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

public int Damage { get; }

Property Value

Type: Int32
Remarks

Tests: DeltaEngine.Physics2D.Tests.Projectile2DTests
Examples

1 unit tests call DeltaEngine.Physics2D.Projectile2D.Damage
[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