Some improvements, added cutscene stub
This commit is contained in:
1 parent
72e05cdc28
commit
be05643b70
27 files changed
+3480
-40
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "dialogue/DialogueDatabase.h"
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
@@ -16,6 +17,8 @@ public:
|
||||
void setDatabase(const DialogueDatabase* value);
|
||||
|
||||
bool startDialogue(const std::string& dialogueId);
|
||||
bool startStandaloneCutscene(const std::string& cutsceneId);
|
||||
void setOnCutsceneFinished(std::function<void(const std::string&)> cb);
|
||||
void stop();
|
||||
|
||||
void update(int deltaMs);
|
||||
@@ -46,6 +49,9 @@ private:
|
||||
PlayingCutscene
|
||||
};
|
||||
|
||||
std::function<void(const std::string&)> onCutsceneFinished;
|
||||
std::string activeCutsceneId;
|
||||
|
||||
const DialogueDatabase* database = nullptr;
|
||||
const DialogueDefinition* activeDialogue = nullptr;
|
||||
const StaticCutsceneDefinition* activeCutscene = nullptr;
|
||||
@@ -68,6 +74,7 @@ private:
|
||||
int cutsceneTimerMs = 0;
|
||||
int cutsceneElapsedMs = 0;
|
||||
int cutsceneTotalDurationMs = 0;
|
||||
int cutsceneContentDurationMs = 0;
|
||||
|
||||
std::string currentCutsceneBackground;
|
||||
|
||||
|
||||
Reference in new issue
Block a user