diff options
Diffstat (limited to 'src/components/Render.hpp')
-rw-r--r-- | src/components/Render.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/Render.hpp b/src/components/Render.hpp index 073cbdf..81ca591 100644 --- a/src/components/Render.hpp +++ b/src/components/Render.hpp @@ -21,7 +21,7 @@ #include "Component.hpp" #include "texture.hpp" -struct Render : Component<Render>, entityx::Component<Render> +struct Render : Component<Render> { public: Texture texture; @@ -53,6 +53,18 @@ public: } return *this; } + + void serialize(cereal::JSONOutputArchive& ar) final { + ar(CEREAL_NVP(visible), CEREAL_NVP(flipX)); + } + + void serialize(cereal::JSONInputArchive& ar) final { + ar(CEREAL_NVP(visible), CEREAL_NVP(flipX)); + } + + std::string serializeName(void) const final { + return "Render"; + } }; #endif // COMPONENT_RENDER_HPP_ |