17 #ifndef ACTOREMITTERLOGIC_H
18 #define ACTOREMITTERLOGIC_H
22 #include "EmitterLogic.h"
72 virtual void update()
override;
92 virtual void emitEntity(
const SpawnParameters& parameters)
override;
95 int getTotalActors()
const {
return mActiveActors.
size() + mInactiveActors.
size(); }
100 QString getActorQmlString()
const;
101 Actor* createActor(
const SpawnParameters& parameters);
104 bool mDecayActors =
false;
110 #endif // ACTOREMITTERLOGIC_H
bool decayActors
Whether or not the spawned actors should be decayed.
Definition: ActorEmitterLogic.h:45
void setDecayActors(bool value)
Sets decayActors.
QString actorModel
QML type of Actor to spawn.
Definition: ActorEmitterLogic.h:39
void decayActorsChanged()
Emitted when decayActors changes.
virtual void update() override
Decays any currently active, previously emitted Actors, and places them back into the internal Actor ...
virtual void emitEntity(const SpawnParameters ¶meters) override
Emits an Actor of type actorModel initialized with parameters.
virtual int getEntityCount() const override
Returns entityCount.
Definition: ActorEmitterLogic.h:66
bool decaysActors() const
Returns decayActors.
Definition: ActorEmitterLogic.h:59
void setActorModel(const QString &value)
Sets actorModel.
Spawns Actors of QML type actorModel into the Game's QML tree through Level::addActor().
Definition: ActorEmitterLogic.h:32
Representation of an entity within the Game scene.
Definition: Actor.h:40
Abstract base class to spawn generic entities into the Game based on configurable parameters...
Definition: EmitterLogic.h:35
const QString & getActorModel() const
Returns actorModel.
Definition: ActorEmitterLogic.h:50
void actorModelChanged()
Emitted when actorModel changes.