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

[Test]
public void EmittersFromSameDataAreStillIndependentlyChangeable()
{
    var emitterData = GetEmitterData(logo);
    var emitterChanging = new ParticleEmitter(emitterData, Vector3D.Zero);
    var emitterStayingSame = new ParticleEmitter(emitterData, Vector3D.UnitX);
    emitterChanging.EmitterData.SpawnInterval += 0.2f;
    emitterChanging.EmitterData.Acceleration = new RangeGraph<Vector3D>(Vector3D.One);
    emitterChanging.EmitterData.Color = new RangeGraph<Color>(Color.Green, Color.Yellow);
    Assert.AreNotEqual(emitterStayingSame.EmitterData.SpawnInterval,
        emitterChanging.EmitterData.SpawnInterval);
    Assert.AreNotEqual(emitterStayingSame.EmitterData.Acceleration.Values,
        emitterChanging.EmitterData.Acceleration.Values);
    Assert.AreNotEqual(emitterStayingSame.EmitterData.Color.Values,
        emitterChanging.EmitterData.Color.Values);
}
See Also