Class BaseSpawn
Class that controls the spawning of particle creation.
Namespace: Evergine.Framework.Particles.Spawn
Assembly: Evergine.Framework.dll
Syntax
public abstract class BaseSpawn
Constructors
BaseSpawn()
Initializes a new instance of the BaseSpawn class.
Declaration
public BaseSpawn()
Fields
firstEmit
Indicates if it's the first time of the emission.
Declaration
protected bool firstEmit
Field Value
Type | Description |
---|---|
bool |
Methods
CreateFromDescription(SpawnDescription)
Creates a spawn class from its description.
Declaration
public static BaseSpawn CreateFromDescription(SpawnDescription spawnDescription)
Parameters
Type | Name | Description |
---|---|---|
SpawnDescription | spawnDescription | The spawn description. |
Returns
Type | Description |
---|---|
BaseSpawn | The spawn class. |
Reset()
Resets the spawning behavior.
Declaration
public virtual void Reset()
SpawnParticles(TimeSpan, EmitterSimulator)
Method that decides how many particles are spawned.
Declaration
public abstract uint SpawnParticles(TimeSpan elapsedTime, EmitterSimulator emitter)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | elapsedTime | The elapsed time. |
EmitterSimulator | emitter | The emitter simulator. |
Returns
Type | Description |
---|---|
uint | The number of new particles. |