add variable field velocity
This commit is contained in:
+2
-7
@@ -6,12 +6,7 @@
|
||||
|
||||
typedef std::array<float, 2> XYVector;
|
||||
|
||||
//enum Colors {pRED, pORANGE, pYELLOW, pGREEN, pBLUE, pINDIGO, pVIOLET};
|
||||
namespace Polyparti {
|
||||
/*inline static float interval = 1.0f / 60;
|
||||
inline static float velocity = 100;
|
||||
static int screenWidth, screenHeight;*/
|
||||
|
||||
class ParticleField {
|
||||
public:
|
||||
ParticleField();
|
||||
@@ -46,7 +41,7 @@ namespace Polyparti {
|
||||
std::unique_ptr<ImplRoom> implRoom;
|
||||
struct fieldInfo {
|
||||
int count;
|
||||
float x, y, deg_start, deg_end, start, life, decayRate;
|
||||
float velocity, x, y, deg_start, deg_end, start, life, decayRate;
|
||||
int screenWidth, screenHeight;
|
||||
std::string color;
|
||||
};
|
||||
@@ -54,7 +49,7 @@ namespace Polyparti {
|
||||
std::vector<ParticleField> field;
|
||||
float x_min = 0, x_max = 0, y_min = 0, y_max = 0;
|
||||
inline static float interval = 1.0f / 60;
|
||||
inline static float velocity = 90;
|
||||
//inline static float velocity = 90;
|
||||
inline static float screenWidth = 1920;
|
||||
inline static float screenHeight = 1080;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user