55 virtual void Update(
float deltaTime);
void SetEmitterShape(EmitterShape shape)
Sets the shape of the area the emitter will emit particles in (outline means particles will only be g...
void SetParticlesPerSecond(float particles)
Sets the amount of particles generated by a continuous emitter.
EmitterType GetEmitterType() const
Returns the type of the emitter.
glm::vec3 GetEmitterPointLocation() const
Returns the location of a point emitter.
eastl::pair< glm::vec3, glm::vec3 > GetEmitterLine()
Returns the start and end of the emitter line.
float GetEmitterSphereRadius() const
Returns the radius of the emitter sphere.
void SetBurstParticleCount(float particlesMin, float particlesMax)
sets the minimum and maximum amount of particles spawned when the burst is triggered. When activated, a random number will be picked somewhere in between these values.
eastl::pair< float, float > GetBurstParticleCount()
Returns the minimum and maximum amount of particles spawned when the burst is triggered.
uint32_t maxParticleCount
eastl::pair< glm::vec3, glm::vec3 > GetEmitterBox()
Returns the corners of the emitter box.
eastl::weak_ptr< Particle > GetParticle() const
Returns a copy of the particle of the emitter.
virtual void Compile()
Compiles the emitter and associated particle. After this, the particle can't be changed. Any particle enum values are also no longer changeable. NOTE: This needs to be called before the emitter can be used.
ParticleGenerationStyle particleGenerationStyle
void SetEmitterLine(glm::vec3 start, glm::vec3 end)
Sets the start and end of the emitter line.
EmitterShape GetEmitterShape() const
Returns the shape of emitter.
void SetEmitterSphereCenter(glm::vec3 center)
Sets the center of the emitter sphere.
void SetMaxParticleCount(uint32_t count)
Sets the maximum number of particles this emitter can have alive at the same time.
void SetEmitterBox(glm::vec3 corner1, glm::vec3 corner2)
Sets the corners of the box emitter.
float burstParticlesPerSecond
float burstParticleCountMax
glm::vec3 GetEmitterSphereCenter() const
Returns the center of the emitter sphere.
void SetEmitterPointLocation(glm::vec3 point)
Sets the location of a point emitter.
void SetParticle(eastl::shared_ptr< Particle > particle)
Sets the particle of the emitter.
uint32_t GetMaxParticleCount() const
Returns the maximum number of particles this emitter can have alive at the same time.
eastl::shared_ptr< Particle > particle
EmitterShape emitterShape
void SetBurstDuration(float durationMin, float durationMax)
Sets the minimum and maximum duration a burst can have. When activated, a random duration will be pic...
void SetMaxParticleCountReachedAction(MaxParticleReachedAction action)
Sets the action that should be used when trying to spawn a new particle while already having the maxi...
eastl::pair< float, float > GetBurstDuration()
Returns the minimum and maximum duration of a burst.
void SetParticleGenerationStyle(ParticleGenerationStyle style)
Sets how the particles are generated. Constant indicates that a new particle is generated every x amo...
float burstParticleCountMin
void SetEmitterSphereRadius(float radius)
Sets the radius of the emitter sphere.
ParticleGenerationStyle GetParticleGenerationStyle() const
Returns the style in which particles are generated.
MaxParticleReachedAction maxParticleReachedAction
void SetEmitterType(EmitterType type)
Sets the type of the emitter.
MaxParticleReachedAction GetMaxParticleCountReachedAction() const
Returns the action that should be used when trying to spawn a new particle while already having the m...
float GetParticlesPerSecond() const
Returns the amount of particles generated by a continuous emitter.
virtual void Update(float deltaTime)
Update the emitter.