Particle IsActive Property Delta Engine Documentation

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

public bool IsActive { get; set; }

Property Value

Type: Boolean
Remarks

Tests: DeltaEngine.Rendering3D.Particles.Tests.Particle2DEmitterTests
Examples

10 unit tests call DeltaEngine.Rendering3D.Particles.Particle.IsActive
[Test]
public void InactiveEmitterDoesNothing()
{
    CreateDataAndEmitter(512, 0.01f, 5);
    emitter.Position = new Vector2D(0.5f, 0.4f);
    emitter.IsActive = false;
}
[Test]
public void SpawnAndDispose()
{
    CreateDataAndEmitter(512, 0.01f, 0.1f);
    emitter.SpawnAndDispose(20);
    AdvanceTimeAndUpdateEntities(0.11f);
    Assert.IsFalse(emitter.IsActive);
}
[Test, CloseAfterFirstFrame]
public void DisposeEmitterAfterSetTime()
{
    emitterData = CreateDataAndEmitterWithAnimation("DeltaEngineLogo");
    emitter = new ParticleEmitter(emitterData, Vector2D.Half);
    emitter.DisposeAfterSeconds(0.1f);
    AdvanceTimeAndUpdateEntities(0.25f);
    emitter.DisposeAfterSeconds(0.1f);
    Assert.IsFalse(emitter.IsActive);
}
See Also