Particle3DEmitterTests Fire 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 Fire()
Examples

[Test]
public void Fire()
{
    var emitterData = GetEmitterData(fire, 512, 2.0f);
    emitterData.Color = new RangeGraph<Color>(new Color(16, 16, 16), new Color(255, 64, 64, 0));
    emitterData.Acceleration = new RangeGraph<Vector3D>(Vector3D.Zero, Vector3D.UnitZ * 0.1f);
    emitterData.Size = new RangeGraph<Size>(new Size(0.2f), new Size(0.1f));
    emitterData.StartVelocity = new RangeGraph<Vector3D>(new Vector3D(0.0f, 0.0f, 0.3f),
        new Vector3D(0.1f, 0.1f, 0.1f));
    new ParticleEmitter(emitterData, new Vector3D(0.1f, 0.0f, 0.0f));
    new ParticleEmitter(emitterData, new Vector3D(0.0f, 0.1f, 0.0f));
}
[Test]
public void ProjectileMovesAcrossScreenEmittingFire()
{
    var start = -3 * Vector3D.UnitX;
    var emitter = new ParticleEmitter(CreateTrackingParticleData(), start);
    var emitter2 = new ParticleEmitter(CreateFireExhaustParticleData(), start);
    emitter.Start<MoveAcrossScreen>();
    emitter2.Start<MoveAcrossScreen>();
}
[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