implement entity-bound emitters

This commit is contained in:
MihailRis
2024-11-03 13:05:42 +03:00
parent 6d63c71221
commit 83ddbda90b
3 changed files with 21 additions and 7 deletions
+3
View File
@@ -9,6 +9,7 @@
#include "maths/UVRegion.hpp"
#include "maths/util.hpp"
class Level;
class Emitter;
struct Particle {
@@ -36,6 +37,7 @@ struct ParticleBehaviour {
};
class Emitter {
const Level& level;
/// @brief Static position or entity
std::variant<glm::vec3, entityid_t> origin;
/// @brief Particle prototype
@@ -60,6 +62,7 @@ public:
ParticleBehaviour behaviour;
Emitter(
const Level& level,
std::variant<glm::vec3, entityid_t> origin,
Particle prototype,
const Texture* texture,