aboutsummaryrefslogtreecommitdiffstats
path: root/include/particle.hpp
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2017-01-19 09:21:12 -0500
committerAndy <drumsetmonkey@gmail.com>2017-01-19 09:21:12 -0500
commit213d9ccfbb4752d4c62d6b7e6b3f9172cdf1bccc (patch)
tree7872c6f30c8adf048a7863a33d837299c7fb0771 /include/particle.hpp
parent19a32074595a4a2797eaeb978f8bd302f736f6a6 (diff)
parent8452b199d28bea53bf2c5e3b3d604064000fc73d (diff)
Limb animation actually works
Diffstat (limited to 'include/particle.hpp')
-rw-r--r--include/particle.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/particle.hpp b/include/particle.hpp
index 92ab7e4..48a8938 100644
--- a/include/particle.hpp
+++ b/include/particle.hpp
@@ -9,22 +9,22 @@
#include <entityx/entityx.h>
enum class ParticleType : char {
- Drop,
- Confetti,
- SmallBlast,
- SmallPoof
+ Drop = 1,
+ Confetti = 2,
+ SmallBlast = 4,
+ SmallPoof = 8
};
struct Particle {
- vec2 location;
- vec2 velocity;
- ParticleType type;
int timeLeft;
+ ParticleType type;
+ vec2 velocity;
+ vec2 location;
vec2 color; // assets/colorIndex.png
Particle(vec2 p, ParticleType t, int tl, vec2 c)
- : location(p), type(t), timeLeft(tl), color(c) {}
-};// __attribute__ ((packed));
+ : timeLeft(tl), type(t), location(p), color(c) {}
+};
class ParticleSystem : public entityx::System<ParticleSystem> {
private: