Click or drag to resize
DigitalRuneParticleSystemPreloadDuration Property
Gets or sets the preload duration.

Namespace: DigitalRune.Particles
Assembly: DigitalRune.Particles (in DigitalRune.Particles.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
[ContentSerializerAttribute(Optional = true)]
public TimeSpan PreloadDuration { get; set; }

Property Value

Type: TimeSpan
The preload duration. The default value is 0 (no preloading).
Remarks

Usually, particle systems start with no particles and particles are added over time. But for some particle systems in a game, the start should not be visible to the user. For example, when the player encounters a waterfall, the waterfall should already be running and not slowly start in front of the player. Such particle systems need to be preloaded.

If Update(TimeSpan) is called for the first time or after a Reset and PreloadDuration is greater than 0, the particle system will automatically advance its state by executing Update(TimeSpan) internally several times. For each internal Update(TimeSpan) call the PreloadDeltaTime is used as the time step size.

Preloading during the first Update(TimeSpan) can take a significant amount of time. It might be better to make the first Update(TimeSpan) call while a game level is loading to avoid any slow-downs at runtime. Setting PreloadDeltaTime to a larger value will also reduce the needed time for preloading.

See Also