![]() |
ManaPlus
|
#include <particlevector.h>
Public Member Functions | |
| ParticleVector (ParticleContainer *const parent, const bool delParent) | |
| ~ParticleVector () | |
| void | setLocally (const int index, Particle *const particle) |
| void | delLocally (const int index) |
| void | clearLocally () |
| void | moveTo (const float x, const float y) |
| size_t | size () const |
| size_t | usedSize () const |
Public Member Functions inherited from ParticleContainer | |
| ParticleContainer (ParticleContainer *const parent, const bool delParent) | |
| virtual | ~ParticleContainer () |
| void | clear () |
Protected Attributes | |
| std::vector< Particle * > | mIndexedElements |
Protected Attributes inherited from ParticleContainer | |
| ParticleContainer * | mNext |
| bool | mDelParent |
Particle container with indexing facilities
Definition at line 38 of file particlevector.h.
| ParticleVector::ParticleVector | ( | ParticleContainer *const | parent, |
| const bool | delParent | ||
| ) |
Definition at line 29 of file particlevector.cpp.
| ParticleVector::~ParticleVector | ( | ) |
Definition at line 35 of file particlevector.cpp.
|
virtual |
Kills and removes all particle effects (only in this container)
Reimplemented from ParticleContainer.
Definition at line 69 of file particlevector.cpp.
References CAST_U32, delLocally(), and mIndexedElements.
| void ParticleVector::delLocally | ( | const int | index | ) |
Removes a particle at a specified index
Definition at line 53 of file particlevector.cpp.
References CAST_SIZE, Particle::kill(), and mIndexedElements.
Referenced by clearLocally(), ActorSprite::handleStatusEffect(), and setLocally().
|
virtual |
Sets the positions of all elements
Reimplemented from ParticleContainer.
Definition at line 79 of file particlevector.cpp.
References Particle::isExtinct(), Particle::kill(), mIndexedElements, ParticleContainer::moveTo(), Particle::moveTo(), x, and y.
| void ParticleVector::setLocally | ( | const int | index, |
| Particle *const | particle | ||
| ) |
Sets a particle at a specified index. Kills the previous particle there, if needed.
Definition at line 38 of file particlevector.cpp.
References CAST_SIZE, delLocally(), Particle::disableAutoDelete(), and mIndexedElements.
Referenced by ActorSprite::handleStatusEffect().
|
inline |
| size_t ParticleVector::usedSize | ( | ) | const |
Definition at line 100 of file particlevector.cpp.
References mIndexedElements.
Referenced by ActorSprite::getParticlesCount().
|
protected |
Definition at line 69 of file particlevector.h.
Referenced by clearLocally(), delLocally(), moveTo(), setLocally(), size(), and usedSize().