#include "pixelGameEngine.h" #include class Star{ vf2d pos; vf2d spd; vf2d size={1,1}; Pixel minBrightness; Pixel maxBrightness; Pixel brightness=minBrightness; int flickerRate=10; //Number of frames between each flicker. int flickerTimer=0; std::uniform_int_distributionredDistribution,greenDistribution,blueDistribution; public: Star(vf2d pos,vf2d spd,Pixel minBrightness,Pixel maxBrightness) :pos(pos),spd(spd),minBrightness(minBrightness),maxBrightness(maxBrightness){ redDistribution=std::uniform_int_distribution(minBrightness.r,maxBrightness.r); greenDistribution=std::uniform_int_distribution(minBrightness.g,maxBrightness.g); blueDistribution=std::uniform_int_distribution(minBrightness.b,maxBrightness.b); } void Update(); void Draw(); };