Class ParticleSystem
Class that represents the particle system asset.
Inherited Members
Namespace: Evergine.Framework.Particles.Asset
Assembly: Evergine.Framework.dll
Syntax
public class ParticleSystem : DisposableObject, ILoadable, IDisposable, IDependencyObject
Properties
Dependencies
Gets the dependency list.
Declaration
public Lazy<List<IDependencyLink>> Dependencies { get; }
Property Value
Type | Description |
---|---|
Lazy<List<IDependencyLink>> |
Emitters
Gets the particle system emitters.
Declaration
public IEnumerable<ParticlesEmitter> Emitters { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ParticlesEmitter> |
Id
Gets or sets the asset Id.
Declaration
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
Guid | The asset path. |
ReaderVersion
Gets the particle system asset version.
Declaration
public Version ReaderVersion { get; }
Property Value
Type | Description |
---|---|
Version |
Methods
AddEmitter(ParticlesEmitter)
Adds a new particle system emitter.
Declaration
public void AddEmitter(ParticlesEmitter emitter)
Parameters
Type | Name | Description |
---|---|---|
ParticlesEmitter | emitter | The new emitter. |
AddEmitterAt(ParticlesEmitter, int)
Adds a new particle system emitter.
Declaration
public void AddEmitterAt(ParticlesEmitter emitter, int index)
Parameters
Type | Name | Description |
---|---|---|
ParticlesEmitter | emitter | The new emitter. |
int | index | The index to be added. |
Destroy()
Destroy all resources of this instance.
Declaration
protected override void Destroy()
Overrides
Instantiate()
Generate an entity that contains this asset.
Declaration
public Entity Instantiate()
Returns
Type | Description |
---|---|
Entity | The entity. |
Invalidate(ILoadable)
Invalidates this instance and raise the Invalidated event with the new ILoadable instance.
Declaration
public void Invalidate(ILoadable newInstance)
Parameters
Type | Name | Description |
---|---|---|
ILoadable | newInstance | The new ILoadable instance. |
ReleaseUnusedMemory()
Release unused memory.
Declaration
public void ReleaseUnusedMemory()
RemoveEmitter(ParticlesEmitter)
Removes the particle system emitter.
Declaration
public void RemoveEmitter(ParticlesEmitter emitter)
Parameters
Type | Name | Description |
---|---|---|
ParticlesEmitter | emitter | The emitter to remove. |
RemoveEmitter(int)
Removes the particle system emitter.
Declaration
public void RemoveEmitter(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index to remove. |
Events
EmitterAdded
Event launched when an emitter has been added to the system.
Declaration
public event EventHandler<ParticlesEmitter> EmitterAdded
Event Type
Type | Description |
---|---|
EventHandler<ParticlesEmitter> |
EmitterRemoved
Event launched when an emitter has been removed to the system.
Declaration
public event EventHandler<ParticlesEmitter> EmitterRemoved
Event Type
Type | Description |
---|---|
EventHandler<ParticlesEmitter> |
Invalidated
Occurs when this instance has been invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
Event Type
Type | Description |
---|---|
EventHandler<ILoadable> |