![]() |
ManaPlus
|
#include <action.h>
Public Member Functions | |
| Action (const std::string &name) | |
| ~Action () | |
| void | setAnimation (const SpriteDirection::Type direction, Animation *const animation) |
| const Animation * | getAnimation (SpriteDirection::Type direction) const |
| unsigned | getNumber () const |
| void | setNumber (const unsigned n) |
| void | setLastFrameDelay (const int delay) |
| int | calcMemoryLocal () const |
| int | calcMemoryChilds (const int level) const |
| std::string | getCounterName () const |
Public Member Functions inherited from MemoryCounter | |
| MemoryCounter () | |
| virtual | ~MemoryCounter () |
| int | calcMemory (const int level) const |
Protected Types | |
| typedef std::map< SpriteDirection::Type, Animation * > | Animations |
| typedef Animations::iterator | AnimationIter |
| typedef Animations::const_iterator | AnimationCIter |
Protected Attributes | |
| Animations | mAnimations |
| std::string | mCounterName |
| unsigned | mNumber |
An action consists of several animations, one for each direction.
|
protected |
|
protected |
|
protected |
|
explicit |
| Action::~Action | ( | ) |
Definition at line 41 of file action.cpp.
References delete_all(), and mAnimations.
|
virtual |
Reimplemented from MemoryCounter.
Definition at line 96 of file action.cpp.
References MemoryCounter::calcMemory(), FOR_EACH, and mAnimations.
|
virtual |
| const Animation * Action::getAnimation | ( | SpriteDirection::Type | direction | ) | const |
Definition at line 46 of file action.cpp.
References SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, nullptr, SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.
|
inlinevirtual |
|
inline |
| void Action::setAnimation | ( | const SpriteDirection::Type | direction, |
| Animation *const | animation | ||
| ) |
Definition at line 74 of file action.cpp.
Referenced by SpriteDef::loadAnimation().
| void Action::setLastFrameDelay | ( | const int | delay | ) |
|
inline |
|
protected |
Definition at line 75 of file action.h.
Referenced by calcMemoryChilds(), and ~Action().
|
protected |
Definition at line 76 of file action.h.
Referenced by getCounterName().
|
protected |
Definition at line 77 of file action.h.
Referenced by getNumber(), and setNumber().