ManaPlus
|
#include <imageparticle.h>
Public Member Functions | |
ImageParticle (Image *const image) | |
void | draw (Graphics *const graphics, const int offsetX, const int offsetY) const |
void | setAlpha (const float alpha) |
Public Member Functions inherited from Particle | |
Particle () | |
~Particle () | |
void | clear () |
bool | update () |
void | draw (Graphics *const graphics, const int offsetX, const int offsetY) const |
int | getPixelY () const |
int | getSortPixelY () const |
Particle * | addEffect (const std::string &particleEffectFile, const int pixelX, const int pixelY, const int rotation) |
void | addEmitter (ParticleEmitter *const emitter) |
void | moveTo (const Vector &pos) |
void | moveTo (const float x, const float y) |
void | moveBy (const Vector &change) |
void | setLifetime (const int lifetime) |
void | setFadeOut (const int fadeOut) |
void | setFadeIn (const int fadeIn) |
void | setVelocity (const float x, const float y, const float z) |
void | setGravity (const float gravity) |
void | setRandomness (const int r) |
void | setBounce (const float bouncieness) |
void | setFollow (const bool follow) |
bool | doesFollow () const |
void | setDestination (Particle *const target, const float accel, const float moment) |
void | setDieDistance (const float dist) |
void | adjustEmitterSize (const int w, const int h) |
void | setAllowSizeAdjust (const bool adjust) |
bool | isAlive () const |
void | prepareToDie () |
bool | isExtinct () const |
void | kill () |
void | disableAutoDelete () |
int | getNumberOfLayers () const |
float | getAlpha () const |
void | setAlpha (const float alpha) |
virtual void | setDeathEffect (const std::string &effectFile, const signed char conditions) |
void | setActor (const BeingId actor) |
Public Member Functions inherited from Actor | |
virtual | ~Actor () |
virtual int | getWidth () const |
virtual int | getHeight () const |
const Vector & | getPixelPositionF () const |
virtual void | setPixelPositionF (const Vector &pos) |
int | getPixelX () const |
virtual int | getTileX () const |
virtual int | getTileY () const |
virtual void | setMap (Map *const map) |
const Map * | getMap () const |
Static Public Attributes | |
static StringIntMap | imageParticleCountByName |
Additional Inherited Members | |
Data Fields inherited from Actor | |
int | mPixelX |
int | mPixelY |
Protected Member Functions inherited from Particle | |
void | updateSelf () |
Protected Member Functions inherited from Actor | |
Actor () | |
Protected Attributes inherited from Particle | |
float | mAlpha |
int | mLifetimeLeft |
int | mLifetimePast |
int | mFadeOut |
int | mFadeIn |
Vector | mVelocity |
AliveStatusT | mAlive |
ParticleTypeT | mType |
SimpleAnimation * | mAnimation |
Image * | mImage |
BeingId | mActor |
Protected Attributes inherited from Actor | |
Map * | mMap |
Vector | mPos |
int | mYDiff |
A particle that uses an image for its visualization.
Definition at line 36 of file imageparticle.h.
|
explicit |
Constructor. The image is reference counted by this particle.
image | an Image instance, may not be NULL |
Definition at line 34 of file imageparticle.cpp.
References ParticleType::Image, imageParticleCountByName, Particle::mImage, Particle::mType, and restrict.
|
virtual |
Draws the particle image
Implements Actor.
Definition at line 53 of file imageparticle.cpp.
References AliveStatus::ALIVE, CAST_S32, FUNC_BLOCK, and anonymous_namespace{mrand.cpp}::mPos.
|
inlinevirtual |
Sets the alpha value used to draw the actor.
Implements Actor.
Definition at line 56 of file imageparticle.h.
References Particle::mAlpha.
|
static |
Definition at line 59 of file imageparticle.h.
Referenced by ParticleEmitter::createParticles(), ImageParticle(), and Particle::~Particle().