![]() |
Middle Europe Productions Library
alpha 1.3.3
|
MEP::AnimationObject is a sprite with the ability to dislay an animation. More...
#include <AnimationObject.h>
Public Member Functions | |
| AnimationObject (const float frameRate, const Object &x, sf::Vector2f pos={ 0.f, 0.f }, sf::Vector2f scale={ 1.f, 1.f }) | |
| void | onResize () override |
| virtual const sf::Vector2u & | getSize () const |
| void | setScale (const sf::Vector2f scale) override |
| void | setScale (const Following &x) override |
| void | runForward (sf::Time ¤tTime) |
| void | runBackward (sf::Time ¤tTime) |
| bool | draw (sf::RenderWindow &window) override |
| void | update (sf::Time ¤tTime) override |
| void | entryUpdate (sf::Time ¤tTime, bool low=false) override |
| void | exitUpdate (sf::Time ¤tTime, bool low=false) override |
| bool | isActive () const override |
| bool | isTansparent (unsigned int x, unsigned int y) override |
| const AnimationObject & | getAnimationObject () |
| virtual void | debugOutput (std::ostream &out) const |
| virtual | ~AnimationObject ()=default |
Public Member Functions inherited from MEP::Animation | |
| Animation ()=default | |
| Animation (const AnimationInit initType, const float frameRate) | |
| Animation (const AnimationInit initType, const sf::Time towait) | |
| Animation (const Animation &x) | |
| virtual void | run (const Direction direc, sf::Time currentTime=sf::Time::Zero) |
| void | changeStatus () |
| bool | getStatus () const |
| void | changeTag (MEP::U_int32 tag) |
| sf::Time | getToWait () const |
| AnimationInit | getInit () const |
| const Direction & | getDirection () const |
| void | setDirection (MEP::Direction dir) |
| virtual bool | reset () |
Public Member Functions inherited from MEPtools::AnimationDelay | |
| void | setDelay (const sf::Time &delay, bool permaDelay=false) |
| void | setEntryDelay (const sf::Time &delay) |
| void | setExitDelay (const sf::Time &delay) |
| void | setLowEntryDelay (const sf::Time &delay) |
| void | setLowExitDelay (const sf::Time &delay) |
| void | setGeneralDelay (const sf::Time &delay, bool permaDelay=false) |
| void | resetDelay () |
Public Member Functions inherited from MEP::Object | |
| Object ()=delete | |
| Object (const Object &x) | |
| Object (const U_int32 ID, const std::string &path, const std::string &filename, bool transparencyM=false) | |
| Object (const U_int32 ID, const std::string &path, const std::string &filename, unsigned int frames, bool transparencyM=false) | |
| Object (const U_int32 ID, std::list< sf::Image > &images, const std::string &filename, bool transparencyM=false) | |
| unsigned long | getNufTextures () const |
| bool | draw (sf::RenderWindow &window) override |
| void | update (sf::Time &) override |
| void | entryUpdate (sf::Time ¤tTime, bool low=false) override |
| void | exitUpdate (sf::Time ¤tTime, bool low=false) override |
| Object * | getObjectPoint () |
| Object & | getObjectRef () |
| const U_int32 & | getID () const |
| const std::string & | getName () const |
| bool | isActive () const |
| const ObjectType & | getType () const |
| unsigned int | nufC () const |
| bool | operator== (const std::string &x) const |
| bool | operator== (const Object &x) const |
| ~Object () override | |
Public Member Functions inherited from MEP::Drawable | |
| void | _link (std::shared_ptr< bool > _li) |
| std::shared_ptr< bool > | _linkAddr () |
| const std::shared_ptr< bool > | _linkAddr () const |
| bool | _isLinked () const |
| U_int32 | getDrawTag () const |
| void | setDrawTag (const U_int32 tag) |
| bool | addDrawTag (const U_int32 tag) |
| bool | removeDrawTag (const U_int32 tag) |
| Drawable ()=default | |
| virtual | ~Drawable () |
Public Member Functions inherited from MEP::Sprite | |
| Sprite (const FollowType &followType, sf::Vector2f pos={ 0.f, 0.f }, sf::Vector2f scale={ 1.f, 1.f }) | |
| Sprite (sf::Vector2f pos={ 0.f, 0.f }, sf::Vector2f scale={ 1.f, 1.f }) | |
| Sprite & | operator<< (const Sprite &x) |
| sf::Sprite & | getSprite () |
| void | updateSprite (sf::Texture &texture) |
| virtual void | updateSprite () |
| void | setPosition (const sf::Vector2f pos) override |
| void | setPosition (const Following &x) override |
| void | setColor (const sf::Color &color) override |
| void | setRect (const sf::IntRect &rect) |
| void | addMethodRect (std::function< sf::IntRect()> method) |
| void | updateRect () |
| const sf::IntRect & | getRect () const |
| const sf::Color & | getColor () const override |
Public Member Functions inherited from MEP::Following | |
| Following (const FollowType &followType, sf::Vector2f pos={ 0.f, 0.f }, sf::Vector2f posFixed={ 0.f, 0.f }, sf::Vector2f scale={ 1.f, 1.f }, sf::Vector2f scaleFixed={ 1.f, 1.f }) | |
| Following (sf::Vector2f pos={ 0.f, 0.f }, sf::Vector2f posFixed={ 0.f, 0.f }, sf::Vector2f scale={ 1.f, 1.f }, sf::Vector2f scaleFixed={ 1.f, 1.f }) | |
| Following (const Following &x) | |
| void | updatePosition () |
| void | addMethodPos (std::function< sf::Vector2f()> method) |
| void | updateScale () |
| void | addMethodScale (std::function< sf::Vector2f()> method) |
| Following & | operator<< (const Following &x) |
| void | setFollow (const AnimationPosition &base, const FollowType type, MEP::U_int32 group=-1) |
| void | setFollow (const AnimationColor &base, MEP::U_int32 toFollow=MEP::ColorChannel::ALL, MEP::U_int32 group=-1) |
| void | muteFollowGroup (MEP::U_int32 group) |
| void | unMuteFollowGroup (MEP::U_int32 group) |
| void | fullMuteFollow () |
| void | fullUnMuteFollow () |
| virtual void | movePosition (const sf::Vector2f pos) |
| sf::Vector2f | getPosition () const |
| sf::Vector2f | getScale () const |
| sf::Vector2f | getOriginPosition () const |
| sf::Vector2f | getOriginScale () const |
| bool | isFollowerActive () const |
| void | followingDebug (std::ostream &out, const char *skipLines="") const |
| void | clearFollow () |
Protected Member Functions | |
| void | init () |
| bool | correctObject (const Object &x) |
| void | updateSize () |
Protected Member Functions inherited from MEP::Animation | |
| void | animationDebug (std::ostream &out) const |
Protected Member Functions inherited from MEPtools::AnimationDelay | |
| const sf::Time & | delay () const |
| bool | updateDelay (const sf::Time ¤tTime) |
| void | newCycle () |
| void | changeState (State newState) |
Protected Member Functions inherited from MEP::Object | |
| void | deleteObject () |
Protected Member Functions inherited from MEP::Drawable | |
| void | notify () |
| void | drawTagDebug (std::ostream &out) const |
Protected Attributes | |
| std::list< sf::Texture * >::iterator | currentFrame |
| unsigned int | index_currentFrame = 0 |
| const AnimationObject * | toFollowOBJ = nullptr |
| sf::Vector2u | fixSize |
Protected Attributes inherited from MEP::Animation | |
| MEP::U_int32 | m_tag = AdditionalTag::AdditionalTagDisabled |
| AnimationInit | isInit = AnimationInit::NotInit |
| sf::Time | updateTime = sf::Time::Zero |
| sf::Time | toWait = sf::Time::Zero |
| bool | isRunning = false |
| Direction | direction = Direction::Backwards |
Protected Attributes inherited from MEPtools::AnimationDelay | |
| State | state = State::Base |
Protected Attributes inherited from MEP::Object | |
| bool | transparency = false |
| bool ** | table = nullptr |
| sf::Vector2u | m_size = {0, 0} |
| std::list< sf::Texture * > * | texture |
| ObjectType | m_type = Object::ObjectType::NotInit |
Protected Attributes inherited from MEP::Sprite | |
| sf::Sprite | currentSprite |
Protected Attributes inherited from MEP::Following | |
| std::function< sf::Vector2f()> | calc_position = [this]()->sf::Vector2f { return m_pos; } |
| std::function< sf::Vector2f()> | calc_scale = [this]()->sf::Vector2f { return m_scale; } |
| MEPtools::GroupManager< Follow, std::unique_ptr< Follow >, std::list< std::unique_ptr< Follow > > > | followingListv2 |
| sf::Vector2f | m_pos = {0.f, 0.f} |
| sf::Vector2f | m_posMove = { 0.f, 0.f } |
| sf::Vector2f | m_posFixed = { 0.f, 0.f } |
| sf::Vector2f | m_scale = { 1.f, 1.f } |
| sf::Vector2f | m_scaleFixed = { 1.f, 1.f } |
| sf::Color | m_color |
| sf::Color | m_colorFixed |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const AnimationObject &x) |
Additional Inherited Members | |
Public Types inherited from MEP::Animation | |
| enum | AnimationInit { AnimationInit::NotInit = 0, AnimationInit::ObjectAnimation = 1, AnimationInit::PositionAnimation = 2 } |
Public Types inherited from MEP::Object | |
| enum | ObjectType { ObjectType::NotInit, ObjectType::Single, ObjectType::Multi } |
Public Types inherited from MEP::Following | |
| enum | FollowType { FollowType::NotInit = 0, FollowType::Objects = 1, FollowType::X_Scale = 2, FollowType::Y_Scale = 3, FollowType::X_Pos = 4, FollowType::Y_Pos = 5, FollowType::Color = 6 } |
Protected Types inherited from MEPtools::AnimationDelay | |
| enum | State { State::Entry, State::Exit, State::Base, State::LowExit, State::LowEntry } |
MEP::AnimationObject is a sprite with the ability to dislay an animation.
|
inline |
Constructor of an animation.
| [in] | frameRate | : Frame rate of an animation. |
| [in] | x | : Object with the animation frames. |
| [in] | pos | : Position of an animation. |
| [in] | scale | : Scale of an animation. |
|
virtualdefault |
|
inlineprotected |
|
inlinevirtual |
Debug output of the class.
Reimplemented from MEP::Object.
|
inlineoverridevirtual |
Override of a MEP::Drawable draw.
Reimplemented from MEP::Drawable.
|
inlineoverridevirtual |
Override of a MEP::Drawable entryUpdate.
Reimplemented from MEP::Drawable.
|
inlineoverridevirtual |
Override of a MEP::Drawable exitUpdate.
Reimplemented from MEP::Drawable.
|
inline |
Outputs the animation object.
|
inlinevirtual |
|
inlineprotected |
|
inlineoverridevirtual |
Outputs the activation status of an animation.
Reimplemented from MEP::Drawable.
|
inlineoverridevirtual |
Checks if a given position is Transparent. MEP::Objects of a button needs to have transparency initialized.
Reimplemented from MEP::Object.
Reimplemented in MEP::Button.
|
inlineoverridevirtual |
On resize we want to update the position.
Reimplemented from MEP::Drawable.
|
inline |
Runs the animation in the backward direction.
| [in] | currentTime | : Current global time. |
|
inline |
Runs the animation in the forward direction.
| [in] | currentTime | : Current global time. |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineprotected |
|
friend |
Overrdie of the << operator for diagnostic purposes.
|
protected |
|
protected |
|
protected |
|
protected |