Particle3DEmitterTests FireOneBullet Method Delta Engine Documentation

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

public void FireOneBullet()
Examples

[Test]
public void FireOneBullet()
{
    var emitterData = GetEmitterData(water, 512, 2.0f);
    emitterData.SpawnInterval = 0.0f;
    emitterData.Acceleration = new RangeGraph<Vector3D>(Vector3D.Zero, Vector3D.Zero);
    emitterData.Color = new RangeGraph<Color>(new Color(255, 255, 255), new Color(255, 255, 255));
    emitterData.Size = new RangeGraph<Size>(new Size(0.5f), new Size(0.5f));
    var emitter = new ParticleEmitter(emitterData, Vector3D.Zero);
    var enemy = new MockEnemy(new Vector3D(0, -3, 0), Size.Half, spark);
    new Command(() => //ncrunch: no coverage start
    {
        emitter.EmitterData.BillboardMode = BillboardMode.Ground;
        emitter.EmitterData.StartVelocity.Start = enemy.Position * 4.0f + enemy.direction * 0.5f;
        emitter.EmitterData.StartVelocity.End = Vector3D.Zero;
        emitter.Spawn();
    }).Add(new KeyTrigger(Key.Space));
    //ncrunch: no coverage end
}
See Also