aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Position.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Position.hpp')
-rw-r--r--src/components/Position.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/Position.hpp b/src/components/Position.hpp
index c801998..6157265 100644
--- a/src/components/Position.hpp
+++ b/src/components/Position.hpp
@@ -21,7 +21,7 @@
#include "Component.hpp"
-struct Position : Component<Position>, entityx::Component<Position>
+struct Position : Component<Position>
{
public:
double x, y;
@@ -42,6 +42,14 @@ public:
}
return *this;
}
+
+ void serialize(cereal::JSONOutputArchive& ar) final {
+ ar(x, y);
+ }
+
+ void serialize(cereal::JSONInputArchive& ar) final {
+ ar(x, y);
+ }
};
#endif // COMPONENT_POSITION_HPP_