Working on save-load system and UI
This commit is contained in:
1 parent
901142385d
commit
d7db0faea3
29 files changed
+708
-180
No files matched your search
@@ -3,6 +3,7 @@
|
||||
#include "dialogue/DialogueDatabase.h"
|
||||
#include "quest/QuestJournal.h"
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include "ISaveable.h"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
namespace ZL::Dialogue {
|
||||
|
||||
class DialogueRuntime {
|
||||
class DialogueRuntime : public ZL::ISaveable {
|
||||
public:
|
||||
void setDatabase(const DialogueDatabase* value);
|
||||
|
||||
@@ -43,10 +44,10 @@ public:
|
||||
|
||||
// Saves whether a dialogue is active, its id, and current node.
|
||||
// Cutscene state is not saved.
|
||||
void save(nlohmann::json& out) const;
|
||||
void save(nlohmann::json& out) const override;
|
||||
// Restores saved dialogue state. Text reveal snaps to completion so the
|
||||
// typing animation doesn't replay. No callbacks are fired on restore.
|
||||
void load(const nlohmann::json& in);
|
||||
void load(const nlohmann::json& in) override;
|
||||
|
||||
private:
|
||||
enum class Mode {
|
||||
|
||||
Reference in new issue
Block a user