Class ParticlesComponent
Class that represents a particle system component.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Particles.Components
Assembly: Evergine.Framework.dll
Syntax
public class ParticlesComponent : Component, IDependencyObject
Constructors
ParticlesComponent()
Initializes a new instance of the ParticlesComponent class.
Declaration
public ParticlesComponent()
Fields
EmitAutomatically
If true, the particle system will start emitting particles automatically.
Declaration
public bool EmitAutomatically
Field Value
Type | Description |
---|---|
bool |
LifeFactor
Gets or sets the life factor.
Declaration
public float LifeFactor
Field Value
Type | Description |
---|---|
float |
TimeFactor
Gets or sets the time factor.
Declaration
public float TimeFactor
Field Value
Type | Description |
---|---|
float |
Transform
The transform of the particle system.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public Transform3D Transform
Field Value
Type | Description |
---|---|
Transform3D |
Properties
Emitters
Gets the particle system emitters.
Declaration
public IEnumerable<EmitterSimulator> Emitters { get; }
Property Value
Type | Description |
---|---|
IEnumerable<EmitterSimulator> |
ForceCPUParticles
Gets or sets a value indicating whether to force to simulate the particle system using CPU instead of compute shader..
Declaration
public bool ForceCPUParticles { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsEmitting
Gets a value indicating whether the particle system is emitting or not.
Declaration
public bool IsEmitting { get; }
Property Value
Type | Description |
---|---|
bool |
ParticleSystem
Gets or sets the particle system asset of the component.
Declaration
public ParticleSystem ParticleSystem { get; set; }
Property Value
Type | Description |
---|---|
ParticleSystem |
SourceEntity
Gets or sets the target entity.
Declaration
public Entity SourceEntity { get; set; }
Property Value
Type | Description |
---|---|
Entity |
SourceEntityId
Gets or sets the id of the target entity.
Declaration
public Guid SourceEntityId { get; set; }
Property Value
Type | Description |
---|---|
Guid |
SourceEntityPath
Gets or sets the path of the target entity.
Declaration
public string SourceEntityPath { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
RefreshParticleSystem()
REfreshes the particle system properties.
Declaration
public void RefreshParticleSystem()
Reset()
Resets the state of the particle system.
Declaration
public void Reset()
Start()
Invoked to start the object.
Declaration
protected override void Start()
Overrides
StartEmitting()
Starts the particles emission.
Declaration
public void StartEmitting()
StopEmitting()
Stop the particles emission.
Declaration
public void StopEmitting()
Events
ParticleSystemUpdated
Event launched when the particle system asset is updated.
Declaration
public event EventHandler<ParticleSystem> ParticleSystemUpdated
Event Type
Type | Description |
---|---|
EventHandler<ParticleSystem> |
SourceEntityChanged
Event fired when a new entity is selected as target of a particle system.
Declaration
public event EventHandler<Entity> SourceEntityChanged
Event Type
Type | Description |
---|---|
EventHandler<Entity> |