ManaPlus
|
#include <castingeffect.h>
Public Member Functions | |
CastingEffect (const int skillId, const int skillLevel, const std::string &animation, const int x, const int y, const int range) | |
~CastingEffect () | |
virtual ActorTypeT | getType () const |
void | draw (Graphics *const graphics, const int offsetX, const int offsetY) const |
int | getSortPixelY () const |
void | update (const int time) |
bool | isTerminated () const |
float | getAlpha () const |
void | setAlpha (const float alpha) |
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 | getPixelY () const |
virtual int | getTileX () const |
virtual int | getTileY () const |
virtual int | getNumberOfLayers () const |
virtual void | setMap (Map *const map) |
const Map * | getMap () const |
Protected Attributes | |
AnimatedSprite * | mSprite |
int | mRectX |
int | mRectY |
int | mRectSize |
int | mAnimationX |
int | mAnimationY |
Protected Attributes inherited from Actor | |
Map * | mMap |
Vector | mPos |
int | mYDiff |
Additional Inherited Members | |
Data Fields inherited from Actor | |
int | mPixelX |
int | mPixelY |
Protected Member Functions inherited from Actor | |
Actor () | |
Definition at line 33 of file castingeffect.h.
CastingEffect::CastingEffect | ( | const int | skillId, |
const int | skillLevel, | ||
const std::string & | animation, | ||
const int | x, | ||
const int | y, | ||
const int | range | ||
) |
Definition at line 39 of file castingeffect.cpp.
References mapTileSize, Actor::mPixelX, Actor::mPixelY, mSprite, Actor::mYDiff, reportAlways, x, and y.
CastingEffect::~CastingEffect | ( | ) |
Definition at line 68 of file castingeffect.cpp.
|
virtual |
Draws the Actor to the given graphics context.
Note: this function could be simplified if the graphics context would support setting a translation offset. It already does this partly with the clipping rectangle support.
Implements Actor.
Definition at line 73 of file castingeffect.cpp.
References UserColorId::ATTACK_RANGE_BORDER, Graphics::drawRectangle(), AnimatedSprite::drawRescaled(), UserPalette::getColorWithAlpha(), mRectSize, mRectX, mRectY, mSprite, Graphics::setColor(), and userPalette.
|
inlinevirtual |
Returns the current alpha value used to draw the actor.
Implements Actor.
Definition at line 61 of file castingeffect.h.
|
inlinevirtual |
Returns the pixel Y coordinate of the actor for sorting only.
Reimplemented from Actor.
Definition at line 54 of file castingeffect.h.
References Actor::mPixelY, and Actor::mYDiff.
|
inlinevirtual |
bool CastingEffect::isTerminated | ( | ) | const |
Definition at line 101 of file castingeffect.cpp.
References AnimatedSprite::isTerminated(), and mSprite.
Referenced by Being::logic().
|
inlinevirtual |
Sets the alpha value used to draw the actor.
Implements Actor.
Definition at line 64 of file castingeffect.h.
void CastingEffect::update | ( | const int | time | ) |
Definition at line 95 of file castingeffect.cpp.
References mSprite, and AnimatedSprite::update().
Referenced by Being::logic().
|
protected |
Definition at line 72 of file castingeffect.h.
|
protected |
Definition at line 73 of file castingeffect.h.
|
protected |
Definition at line 71 of file castingeffect.h.
Referenced by draw().
|
protected |
Definition at line 69 of file castingeffect.h.
Referenced by draw().
|
protected |
Definition at line 70 of file castingeffect.h.
Referenced by draw().
|
protected |
Definition at line 68 of file castingeffect.h.
Referenced by CastingEffect(), draw(), isTerminated(), update(), and ~CastingEffect().