Table of Contents

Class SpawnerFromParent

Namespace
Stride.Particles.Spawners
Assembly
Stride.Particles.dll

A particle spawner which continuously spawns particles based on a condition set in a followed (parent) emitter

[DataContract("SpawnerFromParent")]
[Display("From parent", null)]
public sealed class SpawnerFromParent : ParticleSpawner
Inheritance
SpawnerFromParent
Inherited Members

Constructors

SpawnerFromParent()

Default constructor

public SpawnerFromParent()

Properties

ParentControlFlag

Some initializers require fine control between parent and child emitters. Use the control group to assign such meta-fields.

[DataMember(40)]
[Display("Spawn Control Group", null)]
public ParentControlFlag ParentControlFlag { get; set; }

Property Value

ParentControlFlag

ParentName

Name by which to reference a followed (parent) emitter

[DataMember(30)]
[Display("Parent emitter", null)]
public string ParentName { get; set; }

Property Value

string

ParticleSpawnTrigger

ParticleSpawnTrigger provides a class which checks if the spawning condition has triggered

[DataMember(45)]
public ParticleSpawnTrigger ParticleSpawnTrigger { get; set; }

Property Value

ParticleSpawnTrigger

SpawnCount

The amount of particles this spawner will emit when the event is triggered

[DataMember(50)]
[Display("Particles/trigger", null)]
public Vector2 SpawnCount { get; set; }

Property Value

Vector2

Methods

GetMaxParticlesPerSecond()

Get the maximum number of particles this spawner can emit in one second

public override int GetMaxParticlesPerSecond()

Returns

int

Peak particles per second

InvalidateRelations()

Invalidates relation of this emitter to any other emitters that might be referenced

public override void InvalidateRelations()

SpawnNew(float, ParticleEmitter)

This method will be called form the emitter when it needs to poll how many particles to spawn (usually once per frame)

public override void SpawnNew(float dt, ParticleEmitter emitter)

Parameters

dt float

Time it has past since the last update (in seconds)

emitter ParticleEmitter

Parent emitter in which new particles should be emitter