Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    UpdaterColorOverTime Class

    Namespace: Stride.Particles.Updaters
    Assembly: Stride.Particles.dll

    Updater which sets the particle's color to a fixed value sampled based on the particle's normalized life value

    System.Object → ParticleTransform → ParticleModule → ParticleUpdater → UpdaterColorOverTime
    Derived from UpdaterColorOverTime:

    [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

    | Improve this Doc View Source

    Constructors


    UpdaterColorOverTime()

    Default constructor which also registers the fields required by this updater

    public UpdaterColorOverTime()
    | Improve this Doc View Source

    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
    ParticleUpdater.IsPostUpdater

    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
    | Improve this Doc View Source

    Methods


    PreUpdate()

    public override void PreUpdate()
    Overrides
    ParticleModule.PreUpdate()

    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

    Overrides
    ParticleUpdater.Update(Single, ParticlePool)

    Inherited Members

    ParticleModule.Enabled
    ParticleModule.ResetSimulation()
    ParticleModule.TryGetDebugDrawShape(DebugDrawShape, Vector3, Quaternion, Vector3)
    ParticleModule.RequiredFields
    ParticleModule.SetParentTRS(ParticleTransform, ParticleSystem)
    ParticleModule.InvalidateRelations()
    ParticleTransform.InheritPosition
    ParticleTransform.Position
    ParticleTransform.InheritRotation
    ParticleTransform.Rotation
    ParticleTransform.InheritScale
    ParticleTransform.Scale
    ParticleTransform.ScaleUniform
    ParticleTransform.DisplayParticlePosition
    ParticleTransform.DisplayParticleRotation
    ParticleTransform.DisplayParticleScale
    ParticleTransform.DisplayParticleScaleUniform
    ParticleTransform.WorldPosition
    ParticleTransform.WorldRotation
    ParticleTransform.WorldScale
    ParticleTransform.SetParentTransform(ParticleTransform)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation