I have a particleEgine class. the problem is i can't figure out how too have the user define the number of particles.
Here'se the relevant code
Now the problem is i use the particle array in my Render function and other functionsPHP Code:
class ParticleEngine{
public:
ParticleEngine(int NumParticles,float posx1,float posy1,float posz1 ,float xspeed1,float yspeed1,float zspeed1, bool cont,bool samecolor1 ,float red1,float green1,float blue1);
~ParticleEngine();
bool Keyboard();
bool Render();
bool PassObject(Object Obj);
protected:
static int const MAX_PARTICLES;
particles particle[MAX_PARTICLES];
but i don't know how too make soo i can define the max number of particles in the constuctor;




Reply With Quote