8#ifndef GALAXY_COMPONENTS_ANIMATED_HPP_
9#define GALAXY_COMPONENTS_ANIMATED_HPP_
12#include "galaxy/graphics/anim/Animation.hpp"
34 Animated(
const nlohmann::json& json);
71 void deserialize(
const nlohmann::json& json)
override;
Allows for an entity to be animated.
virtual ~Animated()
Destructor.
graphics::Animation * m_anim
Animation object.
Animated & operator=(Animated &&)
Move assignment operator.
Animated & operator=(const Animated &)=delete
Copy assignment operator.
void set_animation(const std::string &animation)
Sets the active animation.
double m_duration
Time spent on current frame.
bool m_paused
Is the animation paused.
Animated(const Animated &)=delete
Copy constructor.
void deserialize(const nlohmann::json &json) override
Deserializes from object.
nlohmann::json serialize() override
Serializes object.
Allows a class to be serialized.