![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Allows for an entity to be animated. More...
#include <Animated.hpp>
Inheritance diagram for galaxy::components::Animated:
Collaboration diagram for galaxy::components::Animated:Public Member Functions | |
| Animated () | |
| Constructor. | |
| Animated (const nlohmann::json &json) | |
| JSON constructor. | |
| Animated (Animated &&) | |
| Move constructor. | |
| Animated & | operator= (Animated &&) |
| Move assignment operator. | |
| virtual | ~Animated () |
| Destructor. | |
| void | set_animation (const std::string &animation) |
| Sets the active animation. | |
| nlohmann::json | serialize () override |
| Serializes object. | |
| void | deserialize (const nlohmann::json &json) override |
| Deserializes from object. | |
Public Attributes | |
| bool | m_paused |
| Is the animation paused. | |
| double | m_duration |
| Time spent on current frame. | |
| graphics::Animation * | m_anim |
| Animation object. | |
Private Member Functions | |
| Animated (const Animated &)=delete | |
| Copy constructor. | |
| Animated & | operator= (const Animated &)=delete |
| Copy assignment operator. | |
Allows for an entity to be animated.
Definition at line 21 of file Animated.hpp.
| galaxy::components::Animated::Animated | ( | ) |
Constructor.
Definition at line 19 of file Animated.cpp.
| galaxy::components::Animated::Animated | ( | const nlohmann::json & | json | ) |
JSON constructor.
| json | JSON defining object. |
Definition at line 27 of file Animated.cpp.
Here is the call graph for this function:| galaxy::components::Animated::Animated | ( | Animated && | a | ) |
Move constructor.
Definition at line 33 of file Animated.cpp.
|
virtual |
Destructor.
Definition at line 57 of file Animated.cpp.
|
privatedelete |
Copy constructor.
Move assignment operator.
Definition at line 43 of file Animated.cpp.
| void galaxy::components::Animated::set_animation | ( | const std::string & | animation | ) |
Sets the active animation.
| animation | Animation to use. |
Definition at line 62 of file Animated.cpp.
Here is the caller graph for this function:
|
nodiscardoverride |
Serializes object.
Definition at line 68 of file Animated.cpp.
|
override |
Deserializes from object.
| json | Json object to retrieve data from. |
Definition at line 87 of file Animated.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Copy assignment operator.
| bool galaxy::components::Animated::m_paused |
Is the animation paused.
Definition at line 88 of file Animated.hpp.
| double galaxy::components::Animated::m_duration |
Time spent on current frame.
Definition at line 93 of file Animated.hpp.
| graphics::Animation* galaxy::components::Animated::m_anim |
Animation object.
Definition at line 98 of file Animated.hpp.