diff options
author | rtk0c <[email protected]> | 2022-05-22 23:05:03 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-05-22 23:05:03 -0700 |
commit | 123f741e3f5374b93ac39887b62bfa0d66762ae2 (patch) | |
tree | cedbc4b2dd87e2caadfde48a0c12a0336672bdd3 /source/GameObject.hpp | |
parent | c568f0a8c9f0aef00c770b494ee1ff3a89ab48de (diff) |
Changeset: 36 Add basic machinery for levels (no saving/loading yet)
Diffstat (limited to 'source/GameObject.hpp')
-rw-r--r-- | source/GameObject.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/GameObject.hpp b/source/GameObject.hpp index 8961d2a..77488b9 100644 --- a/source/GameObject.hpp +++ b/source/GameObject.hpp @@ -6,6 +6,7 @@ #include "Renderer.hpp" #include "VertexIndex.hpp" +#include <rapidjson/fwd.h> #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> #include <span> @@ -83,6 +84,11 @@ public: virtual void Resleep(); virtual void Update(); + static rapidjson::Value Serialize(GameObject* obj, rapidjson::Document& root); + static std::unique_ptr<GameObject> Deserialize(const rapidjson::Value& value, GameWorld* world); + virtual void ReadSaveFormat(const rapidjson::Value& value); + virtual void WriteSaveFormat(rapidjson::Value& value, rapidjson::Document& root); + protected: void SetParent(GameObject* parent); }; |