MEP::Animation base definition of an animation.
More...
#include <AnimationBase.h>
MEP::Animation base definition of an animation.
◆ AnimationInit
| Enumerator |
|---|
| NotInit | Animation is not initialized.
|
| ObjectAnimation | Animation will be animating Object type of variable.
|
| PositionAnimation | Animation will be animating Position type of variable.
|
◆ Animation() [1/4]
| MEP::Animation::Animation |
( |
| ) |
|
|
default |
◆ Animation() [2/4]
| MEP::Animation::Animation |
( |
const AnimationInit |
initType, |
|
|
const float |
frameRate |
|
) |
| |
|
inline |
Constructor of an base animation.
- Parameters
-
| [in] | initType | : Initialization type. |
| [in] | frameRate | : Frame rate of an animation. |
◆ Animation() [3/4]
| MEP::Animation::Animation |
( |
const AnimationInit |
initType, |
|
|
const sf::Time |
towait |
|
) |
| |
|
inline |
Constructor of an base animation.
- Parameters
-
| [in] | initType | : Initialization type. |
| [in] | towait | : Time to wait between aniamtion frames. |
◆ Animation() [4/4]
| MEP::Animation::Animation |
( |
const Animation & |
x | ) |
|
|
inline |
Copy constructor of an base animation.
- Parameters
-
◆ animationDebug()
| void MEP::Animation::animationDebug |
( |
std::ostream & |
out | ) |
const |
|
inlineprotected |
◆ changeStatus()
| void MEP::Animation::changeStatus |
( |
| ) |
|
|
inline |
Changes current status to !status
◆ changeTag()
Changes the additional tag of an animation.
- Parameters
-
| [in] | tag | MEP::Animation::AdditionalTag. |
◆ getDirection()
| const Direction& MEP::Animation::getDirection |
( |
| ) |
const |
|
inline |
Outputs animation direction.
- Returns
- MEP::Animation::Direction
◆ getInit()
◆ getStatus()
| bool MEP::Animation::getStatus |
( |
| ) |
const |
|
inline |
Outputs a current status of an animation.
- Returns
- true - animation is active, false - animation is unactive.
◆ getToWait()
| sf::Time MEP::Animation::getToWait |
( |
| ) |
const |
|
inline |
Outputs time to wait between animation frames.
- Returns
- sf::Time
◆ reset()
| virtual bool MEP::Animation::reset |
( |
| ) |
|
|
inlinevirtual |
Resets the parameters of the animation if the animation is not active. Reset means changing it's current frame to begin or end depending of the direction. If direction is forward changes to begin otherwise to end.
Reimplemented in MEP::AnimationPosition.
◆ run()
| virtual void MEP::Animation::run |
( |
const Direction |
direc, |
|
|
sf::Time |
currentTime = sf::Time::Zero |
|
) |
| |
|
inlinevirtual |
Sets the running tag to true and changes the direction of a movement, furthermore, it is capable of setting a current time.
- Parameters
-
| [in] | direc | : MEP::Animation::Direction. |
| [in] | currentTime | : sf::Time = sf::Time::Zero. |
Reimplemented in MEP::AnimationPosition.
◆ setDirection()
Sets the direction of an animation.
◆ direction
◆ isInit
◆ isRunning
| bool MEP::Animation::isRunning = false |
|
protected |
◆ m_tag
| MEP::U_int32 MEP::Animation::m_tag = AdditionalTag::AdditionalTagDisabled |
|
protected |
◆ toWait
| sf::Time MEP::Animation::toWait = sf::Time::Zero |
|
protected |
◆ updateTime
| sf::Time MEP::Animation::updateTime = sf::Time::Zero |
|
protected |