17 #ifndef PARTICLEEMITTERLOGIC_H
18 #define PARTICLEEMITTERLOGIC_H
20 #include <Engine/particles/WaterParticleSet.h>
21 #include "EmitterLogic.h"
79 virtual void update()
override;
104 virtual void emitEntity(
const SpawnParameters& parameters)
override;
116 float mPauseDistance = 8.0f;
122 #endif // PARTICLEEMITTERLOGIC_H
void setColor(const QColor &color)
Sets color.
QColor color
Color of spawned particles.
Definition: ParticleEmitterLogic.h:34
virtual QRectF getEmitterWorldBounds()
Returns the bounding box of this emitter in world coordinates.
virtual void onPausedChanged() override
Empties the internal WaterParticleSet when the emitter is paused.
void colorChanged()
Emitted when color changes.
ParticleLayer * getLayer() const
Returns layer.
Definition: ParticleEmitterLogic.h:67
void pauseDistanceChanged()
Emitted when pauseDistance changes.
void setPauseDistance(float value)
Sets pauseDistance.
A collection of WaterParticles which can perform updates each frame.
Definition: WaterParticleSet.h:31
float getPauseDistance() const
Returns pauseDistance.
Definition: ParticleEmitterLogic.h:58
Spawns WaterParticles into the world (i.e. an unbounded WaterParticleSet).
Definition: ParticleEmitterLogic.h:28
float pauseDistance
Distance units from viewport edge to automatically pause the emitter.
Definition: ParticleEmitterLogic.h:39
void setLayer(ParticleLayer *value)
Sets layer.
virtual int getEntityCount() const override
Returns entityCount.
Definition: ParticleEmitterLogic.h:74
ParticleLayer layer
Layer to spawn particles on.
Definition: ParticleEmitterLogic.h:43
int getParticleCount() const
Returns the number of WaterParticles in this set.
Definition: WaterParticleSet.h:42
void layerChanged()
Emitted when layer changes.
virtual void emitEntity(const SpawnParameters ¶meters) override
Spawns a new WaterParticle into an internal WaterParticleSet.
QColor getColor() const
Returns color.
Definition: ParticleEmitterLogic.h:49
Abstract base class to spawn generic entities into the Game based on configurable parameters...
Definition: EmitterLogic.h:35
Wrapper around a b2ParticleSystem, which represents an independent layer of particles.
Definition: ParticleLayer.h:32
virtual void update() override
Pauses the emitter if necessary and updates the internal WaterParticleSet into which particles are sp...
WaterParticleSet & getWaterParticleSet()
Returns the backing WaterParticleSet.
Definition: ParticleEmitterLogic.h:99