Skip to content

Particle Emitter

When you add a particle emitter configuration to the particle system, it will internally create a particle emitter and return it to your effect, such that you can modify its configuration even after its creation.

The particle emitter implements the following interface.

public interface IParticleEmitter
{
    /// <summary>
    /// Set the position of the particle emitter in the system.
    /// </summary>
    Vector2 Position { get; set; }

    /// <summary>
    /// The emission rate of a particle emitter defines how many particles it generates per second.
    /// </summary>
    float EmissionRate { get; set; }

    /// <summary>
    /// Set a range for the particle moving direction.
    /// </summary>
    Range<float> Angle { get; set; }

    /// <summary>
    /// Set a range for the particle speed.
    /// </summary>
    Range<float> Speed { get; set; }

    /// <summary>
    /// Set a range for the particle life in seconds.
    /// </summary>
    Range<float> Life { get; set; }

    /// <summary>
    /// Set the range for the particles radial acceleration.
    /// </summary>
    Range<float> RadialAcceleration { get; set; }

    /// <summary>
    /// Set the range for the particles tangential acceleration.
    /// </summary>
    Range<float> TangentialAcceleration { get; set; }

    /// <summary>
    /// Set the position of the particles rotation axis.
    /// </summary>
    Vector2 AxisPosition { get; set; }

    /// <summary>
    /// Set the color at the beginning of a particles lifespan.
    /// </summary>
    SKColor BeginColor { get; set; }

    /// <summary>
    /// Set the color at the end of a particles lifespan.
    /// </summary>
    SKColor EndColor { get; set; }

    /// <summary>
    /// Set the size at the beginning of a particles lifespan. 
    /// </summary>
    Range<float> BeginSize { get; set; }

    /// <summary>
    /// Set the size at the end of a particles lifespan. 
    /// </summary>
    Range<float> EndSize { get; set; }

    /// <summary>
    /// Enable transition from BeginSize to EndSize during particles lifespan.
    /// </summary>
    bool EnableSizeTransition { get; set; }

    /// <summary>
    /// Enable transition from BeginColor to EndColor during particles lifespan.
    /// </summary>
    bool EnableColorTransition { get; set; }
}

Read more: