aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/ReplaySystem.h
blob: 919c554bce20fa31a1e85b46303055c680f7fb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
};

}