1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
struct DirectionalEmitterMode
{
DirectionalEmitterMode(){};
// Creating a constructor for ease of use
DirectionalEmitterMode( Vector2D& Position,
Vector2D& Heading = Vector2D(1,0),
Vector2D& Acceleration = Vector2D(0,0),
Vector2D& Force = Vector2D(0,0),
Vector2D& Speed = Vector2D(100,100),
Vector2D& MaxSpeed = Vector2D(100,100),
unsigned int NOfParticle = 100,
double Radius = 0,
double Angle = 360,
double Randomness = 20,
double LifeTime = 200,
double Energy = 50,
double BurstRate = 0.01,
bool Reuse = true,
bool FadeOut = false);
void SetTexture(sf::Texture&);
void SetConvexShape(sf::ConvexShape&);
void SetCircleShape(sf::CircleShape&);
void SetPixelArray(sf::Color,sf::Color);
/** PARTICLE PROPERTIES **/
Vector2D m_Position;
Vector2D m_Heading;
Vector2D m_Acceleration;
Vector2D m_Force;
Vector2D m_Speed;
Vector2D m_MaxSpeed;
double m_Angle;
double m_Randomness;
double m_Radius;
double m_LifeTime;
double m_Energy;
/** EMITTER PROPERTIES **/
bool m_Reuse;
double m_BurstRate;
sf::Texture* m_pTexture;
sf::ConvexShape m_ConvexShape;
sf::CircleShape m_CircleShape;
unsigned int m_NOfParticles;
sf::BlendMode m_BlendMode;
bool m_FadeOut;
sf::Color m_AlphaColor;
unsigned int m_AlphaValue;
sf::Color m_StartColor;
sf::Color m_EndColor;
unsigned int m_ParticleType;
/** WINDOW PROPERTIES **/
unsigned int m_WndWidth;
unsigned int m_WndHeight;
};
|