aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ReplaySystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/ReplaySystem.h')
-rw-r--r--src/crepe/system/ReplaySystem.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/crepe/system/ReplaySystem.h b/src/crepe/system/ReplaySystem.h
new file mode 100644
index 0000000..919c554
--- /dev/null
+++ b/src/crepe/system/ReplaySystem.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "../manager/ReplayManager.h"
+#include "../manager/SystemManager.h"
+
+#include "System.h"
+
+namespace crepe {
+
+class ReplaySystem : public System {
+public:
+ using System::System;
+
+ void fixed_update() override;
+
+private:
+ ReplayManager::State last_state = ReplayManager::IDLE;
+
+ struct Snapshot {
+ ComponentManager::Snapshot components;
+ SystemManager::Snapshot systems;
+ };
+ Snapshot playback;
+
+ void playback_begin();
+ void playback_end();
+};
+
+}
+