UpdaterColorOverTime Class
Namespace: Stride.Particles.UpdatersAssembly: Stride.Particles.dll
Updater which sets the particle's color to a fixed value sampled based on the particle's normalized life value
[DataContract("UpdaterColorOverTime")]
[Display("Color Animation", null)]
public class UpdaterColorOverTime : ParticleUpdater
Name | Description | |
---|---|---|
Constructors | ||
UpdaterColorOverTime() | Default constructor which also registers the fields required by this updater |
|
Properties | ||
IsPostUpdater | All updaters are called exactly once during each ParticleEmitter's update. Most updaters are called before spawning the new particles for the frame, but post updaters are called after that. |
|
SamplerMain | The main curve sampler. Particles will change their value based on the sampled values |
|
SamplerOptional | Optional sampler. If present, particles will pick a random value between the two sampled curves |
|
SeedOffset | Seed offset. You can use this offset to bind the randomness to other random values, or to make them completely unrelated |
|
Methods | ||
PreUpdate() | ||
Update(Single, ParticlePool) | Updates all particles in the ParticlePool using this updater |
Constructors
UpdaterColorOverTime()
Default constructor which also registers the fields required by this updater
public UpdaterColorOverTime()
Properties
IsPostUpdater
All updaters are called exactly once during each ParticleEmitter's update. Most updaters are called before spawning the new particles for the frame, but post updaters are called after that.
public override bool IsPostUpdater { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
SamplerMain
The main curve sampler. Particles will change their value based on the sampled values
[DataMember(100)]
[Display("Main", null)]
public ComputeCurveSampler<Color4> SamplerMain { get; set; }
Property Value
Type | Description |
---|---|
ComputeCurveSampler<Color4> |
SamplerOptional
Optional sampler. If present, particles will pick a random value between the two sampled curves
[DataMember(200)]
[Display("Optional", null)]
public ComputeCurveSampler<Color4> SamplerOptional { get; set; }
Property Value
Type | Description |
---|---|
ComputeCurveSampler<Color4> |
SeedOffset
Seed offset. You can use this offset to bind the randomness to other random values, or to make them completely unrelated
[DataMember(300)]
[Display("Random Seed", null)]
public uint SeedOffset { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
PreUpdate()
public override void PreUpdate()
Overrides
Update(Single, ParticlePool)
Updates all particles in the ParticlePool using this updater
public override void Update(float dt, ParticlePool pool)
Parameters
Type | Name | Description |
---|---|---|
System.Single | dt | Delta time in seconds which has passed since the last update call |
ParticlePool | pool | The target ParticlePool which needs to be updated |