class Effect{ public: std::vector particles; 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 maxLifeTime=0; int lifetime=0; public: FountainEffect(int fountainDensity,int lifetime) :fountainDensity(fountainDensity),lifetime(lifetime),maxLifeTime(lifetime){} void create(std::vector&PARTICLES){ lifetime=maxLifeTime; for (int i=0;i0; } }; FountainEffect*FOUNTAIN_EFFECT;