![]() |
nCine 2025.06.r503-ff15d8d
A cross-platform 2D game engine
|
Particle color affector. More...
#include <ParticleAffectors.h>
Classes | |
struct | ColorStep |
Public Member Functions | |
ColorAffector (ColorAffector &&)=default | |
Default move constructor. | |
ColorAffector & | operator= (ColorAffector &&)=default |
Default move assignment operator. | |
ColorAffector | clone () const |
Returns a copy of this object. | |
void | affect (Particle *particle, float normalizedAge) override |
Affects the color of the specified particle. | |
void | addColorStep (float age, const Colorf &color) |
void | addColorStep (const ColorStep &step) |
unsigned int | numSteps () const override |
Returns the number of steps. | |
void | removeStep (unsigned int index) override |
Removes the step at the specified position index. | |
void | clearSteps () override |
Removes all steps. | |
nctl::Array< ColorStep > & | steps () |
const nctl::Array< ColorStep > & | steps () const |
![]() | |
ParticleAffector (Type type) | |
void | affect (Particle *particle) |
Affects a property of the specified particle. | |
Type | type () const |
Returns the affector type. | |
bool | isEnabled () const |
Returns true if the affector is enabled. | |
void | setEnabled (bool enabled) |
Enables or disables the affector. | |
Protected Member Functions | |
ColorAffector (const ColorAffector &other)=default | |
Protected default copy constructor used to clone objects. | |
![]() | |
ParticleAffector (const ParticleAffector &other)=default | |
Protected default copy constructor used to clone objects. | |
Additional Inherited Members | |
![]() | |
enum class | Type { COLOR , SIZE , ROTATION , POSITION , VELOCITY } |
![]() | |
Type | type_ |
Affector type. | |
bool | enabled_ |
A flag indicating whether the affector is enabled or not. | |
Particle color affector.
|
overridevirtual |
Affects the color of the specified particle.
Implements ncine::ParticleAffector.
|
inlineoverridevirtual |
Removes all steps.
Implements ncine::ParticleAffector.
|
inlineoverridevirtual |
Returns the number of steps.
Implements ncine::ParticleAffector.
|
overridevirtual |
Removes the step at the specified position index.
Implements ncine::ParticleAffector.