|
| VEmitter (float x, float y, unsigned int MaxSize=0) |
|
| VEmitter (sf::Vector2f position, unsigned int MaxSize=0) |
|
VEmitter * | LoadParticlesFromFile (int Amount, const sf::String &Filename, bool Animated=false, int Width=1, int Height=1, const sf::IntRect &Rect=sf::IntRect(), bool RandomFrames=true) |
|
VEmitter * | LoadParticles (int Amount, sf::Texture &Texture, bool Animated=false, int Width=1, int Height=1, const sf::IntRect &Rect=sf::IntRect(), bool RandomFrames=true) |
|
VEmitter * | MakeParticles (int Amount, int Width, int Height, sf::Color Color=sf::Color::White) |
|
virtual void | Kill () override |
| Kills the emitter and all of its particles.
|
|
virtual void | Revive () override |
| Revives the emitter.
|
|
virtual void | Destroy () override |
| Deletes and removes all particles before destroying any data stored in the emitter.
|
|
virtual void | Update (float dt) override |
|
virtual void | Draw (sf::RenderTarget &RenderTarget) override |
|
VEmitter * | Start (int Amount=0) |
|
void | Stop () |
| Stops emitter from emitting without the need to kill it.
|
|
bool | IsRunning () |
| Check if the emitter is currently active.
|
|
virtual void | EmitParticle () |
| Emits a single particle. This can be called directly if you don't want to emit a bunch of particles in sequence or as a special pattern.
|
|
| VGroup (unsigned int maxSize=0) |
|
int | Length () |
|
VBase * | Add (VBase *object) |
|
VBase * | Remove (VBase *object, bool splice=false) |
|
VBase * | FirstAvailable () |
|
int | FirstNULL () |
|
VBase * | FirstExisting () |
|
VBase * | FirstAlive () |
|
VBase * | FirstDead () |
|
int | CountAlive (bool Recursive=false) |
|
int | CountDead (bool Recursive=false) |
|
VBase * | GetRandom (int min=0, int max=0) |
|
void | ForEach (std::function< void(VBase *)> function, bool recursive=false) |
|
void | ForEachAlive (std::function< void(VBase *)> function, bool recursive=false) |
|
void | ForEachDead (std::function< void(VBase *)> function, bool recursive=false) |
|
void | ForEachExists (std::function< void(VBase *)> function, bool recursive=false) |
|
VBase * | GetGroupItem (int index) |
|
template<class T > |
T * | GetGroupItemAsType (int index) |
|
int | GetIndexOfItem (VBase *object) |
|
void | OrganiseNULLS () |
| Sort nullptr members to the bottom of the group.
|
|
void | Swap (int a, int b) |
|
void | Sort (std::function< bool(VBase *, VBase *)> func) |
|
void | Reverse () |
| Reverse order of group.
|
|
void | Clear () |
| Clears the whole group (does not destroy any of the members, that must be done using the Destroy method).
|
|
|
float | Frequency = 0.5f |
| The delay between particles emitting.
|
|
unsigned int | AmountPerEmit = 1 |
| The amount of particles to activate per emit, in case you want more than one particle to appear at once.
|
|
bool | Explosion = false |
| If true, the emitter will emit all the particles at once, instead of at the rate of Frequency.
|
|
bool | Circular = false |
| If true, particles will be emitted at a normalized velocity (set with SpeedRange) or a random angle. If false, particles will be emitted with a randomized velocity (set with VelocityRange).
|
|
bool | Constant = false |
| If true, the emitter will emit particles continuously. If false, particles will emit until the number of particles emitted is greater than or equal to the amount parameter passed in (or the max set of amount).
|
|
sf::Vector2f | Position |
| Position to emit particles from.
|
|
sf::Vector2f | Size |
| Range relative to the position which to emit particles from (-Size/2 to Size/2)/.
|
|
bool | Moves = true |
| If true, particles should move.
|
|
bool | Immovable = false |
| If true, when particles have collided, their velocity or position cannot be effected.
|
|
int | AllowCollisions = VObject::TOUCHALL |
| Which sides are allowed to be collided with.
|
|
sf::Vector2f | ScrollFactor |
| The amount the object will appear to move when the camera scrolls (1.0f = Scrolls as fast as the camera, 0.5f = Scrolls half as fast as the camera). Good for parallax scrolling.
|
|
float | RotateFactor = 1 |
| The amount the object will appear to rotate when the camera rotates (1.0f = Rotates as fast as the camera, 0.5f = Rotates half as fast as the camera). Good for parallax scrolling.
|
|
float | ZoomFactor = 1 |
| The amount the object will appear to scale when the camera zooms (1.0f = Scales as fast as the camera, 0.5f = Scales half as fast as the camera). Good for parallax scrolling.
|
|
VRange< float > | Lifespan |
| The amount of time a particle is active for.
|
|
VRange< sf::Vector2f > | VelocityRange |
| The range of velocity the particle will be when emitted (used when Circular == false).
|
|
VRange< float > | EmittingAngle |
| The direction the particle will move in when emitted (used when Circular == true).
|
|
VRange< float > | SpeedRange |
| The speed of the particle when emitted (used when Circular == true).
|
|
VRange< float > | AngleVelocityRange |
| The velocity of rotation of the particle.
|
|
VRange< float > | AngleAccelerationRange |
| The acceleration of rotation of the particle.
|
|
VRange< float > | AngleDragRange |
| The drag of rotation of the particle.
|
|
VRange< float > | AngleRange |
| The angle the particle will initially emit at.
|
|
VRange< sf::Vector2f > | DragRange |
| The amount of drag movement of the particle.
|
|
VRange< sf::Vector2f > | AccelerationRange |
| The amount of acceleration of the particle.
|
|
VRange< float > | ElasticityRange |
| The bounciness of a particle.
|
|
VRangeBounds< sf::Vector2f > | ScaleRange |
| The scale of the particle, interpolates using LifeSpan as the total length of time.
|
|
VRangeBounds< sf::Color > | ColourRange |
| The colour tint of the particle, interpolates using LifeSpan as the total length of time.
|
|
VRangeBounds< float > | AlphaRange |
| The alpha transparency of the particle, interpolates using LifeSpan as the total length of time.
|
|
VParticle * | ParticleInstance = new VParticle() |
| The main instance of all particles in the emitter, can be overwritten to a class that inherits from VParticle, but will only be used when particles are loaded or created.
|
|
sf::RenderStates | RenderState = sf::RenderStates::Default |
| The RenderState that applies to all particles in the emitter.
|
|
bool | active = true |
| Base can be updated using Update if true.
|
|
bool | visible = true |
| Base can be rendered using Draw if true.
|
|
bool | alive = true |
| Helper member that is mainly used filter out behaviours to objects which aren't alive in the scene.
|
|
bool | exists = true |
| Base can be updated and rendered if true, else it would no longer be treated as being part of the scene.
|
|
VType | type = NONE |
| Base object type, typically set in the constructor of an inherited object to specify what type it is.
|
|
uint32_t | RefCount = 0 |
| Counts the amount of times the object is referenced in groups, ensures an object is only destroyed when no longer part of a single group.
|
|
|
sf::VertexArray | vertices |
| All particles are rendered from a single set of vertices rendering a Quad.
|
|
bool | disposible = false |
| If true, texture will be destroyed within VSprite. Important if texture isn't loaded from VContent.
|
|
sf::Color | mainTint |
| Tint for all particles, particularly used for creating particles with the MakeParticles function.
|
|
bool | running = false |
| Allows the particles processed while running if true.
|
|
bool | willKill = false |
| Particles will be killed when the timer exceeds the emitter's timespan.
|
|
float | timer = 0 |
| Timer that increases from start.
|
|
int | counter = 0 |
| Counts the amount of particles currently emitted before the emitter shall stop.
|
|
int | amount = 0 |
| Amount of particles to emit from start.
|
|
std::vector< VBase * > | members |
| VBase List.
|
|
int | length = 0 |
| Current amount of members in the list.
|
|
unsigned int | MaxSize = 0 |
| Maximum Size of the list, used if VGroup is set to have a fixed size.
|
|
A particle effects system that overrides VGroup.