Class ParticleChildInitializer
- Namespace
- Stride.Particles.Initializers
- Assembly
- Stride.Particles.dll
Base class for initializers which reference a parent particle emitter
[DataContract("ParticleChildInitializer")]
public abstract class ParticleChildInitializer : ParticleInitializer
- Inheritance
-
ParticleChildInitializer
- Derived
- Inherited Members
Fields
Parent
Referenced parent emitter
protected ParticleEmitter Parent
Field Value
Properties
ParentControlFlag
Some initializers require fine control between parent and child emitters. Use the control group to assign such meta-fields.
[DataMember(13)]
[Display("Spawn Control Group", null)]
public ParentControlFlag ParentControlFlag { get; set; }
Property Value
ParentName
Name by which to reference a followed (parent) emitter
[DataMember(11)]
[Display("Parent emitter", null)]
public string ParentName { get; set; }
Property Value
ParentSeedOffset
The parent seed offset is used to determine which particle from the pool should be picked as a parent in case there is no control group
[DataMember(12)]
[Display("Parent Offset", null)]
public uint ParentSeedOffset { get; set; }
Property Value
Methods
AddControlGroup()
Adds the required control group field to the parent emitter's pool
protected virtual void AddControlGroup()
GetSpawnControlField()
Gets a field accessor to the parent emitter's spawn control field, if it exists
protected ParticleFieldAccessor<ParticleChildrenAttribute> GetSpawnControlField()
Returns
InvalidateRelations()
Invalidates relation of this emitter to any other emitters that might be referenced
public override void InvalidateRelations()
RemoveControlGroup()
Removes the old required control group field from the parent emitter's pool
protected virtual void RemoveControlGroup()
SetParentTRS(ParticleTransform, ParticleSystem)
Sets the parent (particle system's) translation, rotation and scale (uniform) The module can choose to inherit, use or ignore any of the elements
public override void SetParentTRS(ParticleTransform transform, ParticleSystem parentSystem)
Parameters
transform
ParticleTransformParticleSystem's transform (from the Transform component) or identity if local space is used
parentSystem
ParticleSystem