aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Light.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2019-09-02 18:23:09 -0400
committerClyne Sullivan <clyne@bitgloo.com>2019-09-02 18:23:09 -0400
commit6614ea639414caab546091841bf920fe6459cc9e (patch)
tree408df7aeb419ed6e096512d371f499ac6732cade /src/components/Light.hpp
parent0466537f81106f679c0b291be26861862c43c13c (diff)
json entity saving: cout
Diffstat (limited to 'src/components/Light.hpp')
-rw-r--r--src/components/Light.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/Light.hpp b/src/components/Light.hpp
index ee215a6..2cb0e1b 100644
--- a/src/components/Light.hpp
+++ b/src/components/Light.hpp
@@ -22,7 +22,7 @@
#include "Component.hpp"
-struct Light : Component<Light>, entityx::Component<Light>
+struct Light : Component<Light>
{
public:
float r, g, b;
@@ -49,6 +49,14 @@ public:
}
return *this;
}
+
+ void serialize(cereal::JSONOutputArchive& ar) final {
+ ar(r, g, b, strength);
+ }
+
+ void serialize(cereal::JSONInputArchive& ar) final {
+ ar(r, g, b, strength);
+ }
};
#endif//COMPONENT_LIGHT_HPP_