Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Ndk::ParticleEmitterComponent Class Reference

NDK class that represents the component emitter of particles. More...

Inheritance diagram for Ndk::ParticleEmitterComponent:
Nz::ParticleEmitter

Public Types

using SetupFunc = std::function< void(const EntityHandle &, Nz::ParticleMapper &, unsigned int)>
 

Public Member Functions

 ParticleEmitterComponent ()
 Constructs an ParticleEmitterComponent object by default.
 
 ParticleEmitterComponent (const ParticleEmitterComponent &emitter)=default
 
 ParticleEmitterComponent (ParticleEmitterComponent &&emitter)=default
 
void Enable (bool active=true)
 Enables the emission of particles. More...
 
bool IsActive () const
 Checks whether the emission of particles is activated. More...
 
void SetSetupFunc (SetupFunc func)
 Sets the function use for setting up particles. More...
 
- Public Member Functions inherited from Nz::ParticleEmitter
 ParticleEmitter ()
 Constructs a ParticleEmitter object by default.
 
 ParticleEmitter (const ParticleEmitter &emitter)
 
 ParticleEmitter (ParticleEmitter &&emitter)
 
virtual void Emit (ParticleGroup &system, float elapsedTime) const
 Emits particles according to the delta time between the previous frame. More...
 
void EnableLagCompensation (bool enable)
 Enables the lag compensation. More...
 
std::size_t GetEmissionCount () const
 Gets the emission count. More...
 
float GetEmissionRate () const
 Gets the emission rate. More...
 
bool IsLagCompensationEnabled () const
 Checks whether the lag compensation is enabled. More...
 
void SetEmissionCount (std::size_t count)
 Sets the emission count. More...
 
void SetEmissionRate (float rate)
 Sets the emission rate. More...
 
ParticleEmitteroperator= (const ParticleEmitter &emitter)=default
 
ParticleEmitteroperator= (ParticleEmitter &&emitter)
 
 NazaraSignal (OnParticleEmitterMove, ParticleEmitter *, ParticleEmitter *)
 
 NazaraSignal (OnParticleEmitterRelease, const ParticleEmitter *)
 

Static Public Attributes

static ComponentIndex componentIndex
 

Detailed Description

NDK class that represents the component emitter of particles.

Member Function Documentation

◆ Enable()

void Ndk::ParticleEmitterComponent::Enable ( bool  active = true)
inline

Enables the emission of particles.

Parameters
activeShould the emitter be active

◆ IsActive()

bool Ndk::ParticleEmitterComponent::IsActive ( ) const
inline

Checks whether the emission of particles is activated.

Parameters
trueIf it is the case

◆ SetSetupFunc()

void Ndk::ParticleEmitterComponent::SetSetupFunc ( SetupFunc  func)
inline

Sets the function use for setting up particles.

Parameters
funcFunction to set up particles

The documentation for this class was generated from the following files: