mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Re-added ParticleSystem:setQuads(q1, q2, ...). Active particles use the quads based on the particle's lifetime in a similar style to ParticleSystem:setColors and ParticleSystem:setSizes.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "common/Vector.h"
|
||||
#include "graphics/Drawable.h"
|
||||
#include "graphics/Color.h"
|
||||
#include "graphics/Quad.h"
|
||||
#include "Texture.h"
|
||||
|
||||
// STL
|
||||
@@ -421,6 +422,17 @@ public:
|
||||
**/
|
||||
std::vector<Color> getColor() const;
|
||||
|
||||
/**
|
||||
* Sets a list of Quads to use for particles over their lifetime.
|
||||
**/
|
||||
void setQuads(const std::vector<Quad *> &newQuads);
|
||||
void setQuads();
|
||||
|
||||
/**
|
||||
* Gets the Quads used when drawing the particles.
|
||||
**/
|
||||
const std::vector<Quad *> &getQuads() const;
|
||||
|
||||
/**
|
||||
* sets whether particle angles & rotations are relative to their velocities.
|
||||
**/
|
||||
@@ -531,6 +543,8 @@ protected:
|
||||
float spinEnd;
|
||||
|
||||
Colorf color;
|
||||
|
||||
int quadIndex;
|
||||
};
|
||||
|
||||
// Pointer to the beginning of the allocated memory.
|
||||
@@ -625,6 +639,9 @@ protected:
|
||||
// Color.
|
||||
std::vector<Colorf> colors;
|
||||
|
||||
// Quads.
|
||||
std::vector<Quad *> quads;
|
||||
|
||||
bool relativeRotation;
|
||||
|
||||
void createBuffers(size_t size);
|
||||
|
||||
Reference in New Issue
Block a user