Added support for multiple emitters. (ParticleEmitter component now friend class to ParticleSystem)
This commit is contained in:
@@ -5,11 +5,15 @@
|
||||
#include "Color.h"
|
||||
#include <vector>
|
||||
|
||||
namespace Systems { class ParticleSystem; }
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct ParticleEmitter : Component
|
||||
{
|
||||
friend class Systems::ParticleSystem;
|
||||
|
||||
EntityID ParticleTemplate;
|
||||
float SpawnFrequency;
|
||||
int SpawnCount;
|
||||
@@ -19,6 +23,9 @@ struct ParticleEmitter : Component
|
||||
double LifeTime;
|
||||
std::vector<glm::vec3> VelocitySpectrum;
|
||||
std::vector<glm::vec3> AngularVelocitySpectrum;
|
||||
|
||||
private:
|
||||
double TimeSinceLastSpawn;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user