#ifndef EFFECT_H #define EFFECT_H #include "particle.h" #include "pixelGameEngine.h" using namespace olc; class Effect{ public: std::vector particles; int maxLifeTime=0; virtual void create(std::vector&PARTICLES)=0; virtual bool update()=0; Effect(){} void render(PixelGameEngine*game) { for (int i=0;irender(game); } } }; class FountainEffect:public Effect{ int fountainDensity=0; int lifetime=0; public: FountainEffect(int fountainDensity,int lifetime) :fountainDensity(fountainDensity),lifetime(lifetime){ this->maxLifeTime=lifetime; } void create(std::vector&PARTICLES){ lifetime=maxLifeTime; for (int i=0;i0; } }; FountainEffect*FOUNTAIN_EFFECT; #endif