meta_system.hpp 1.79 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <audio.hpp>
#include <mirrage/ecs/ecs.hpp>
#include <mirrage/gui/debug_ui.hpp>
#include <mirrage/utils/units.hpp>


namespace mirrage {
	namespace renderer {
		class Deferred_renderer;
	}
	namespace renderer {
		class Loading_system;
	}
} // namespace mirrage


namespace phase_shifter {
	class Game_engine;

Florian Oetke's avatar
Florian Oetke committed
22
23
	namespace gameplay {
		class Beat_system;
Florian Oetke's avatar
Florian Oetke committed
24
		class Movement_system;
25
		class Camera_system;
Florian Oetke's avatar
Florian Oetke committed
26
	} // namespace gameplay
27
28
29
	namespace helper {
		class Attachment_system;
	}
Florian Oetke's avatar
Florian Oetke committed
30
31
32
	namespace input {
		class Input_system;
	}
33
34
35
	namespace ui {
		class Hud_system;
	}
Georg Schäfer's avatar
Georg Schäfer committed
36
37
38
	namespace level {
		class Level_system;
	}
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

	class Meta_system {
	  public:
		Meta_system(Game_engine&);
		~Meta_system();

		void update(mirrage::util::Time dt);
		void draw();

		void pause();
		void resume();

		void shrink_to_fit();

		auto entities() noexcept -> auto& { return _entities; }
		auto renderer() noexcept -> auto& { return *_renderer; }
Georg Schäfer's avatar
Georg Schäfer committed
55
		auto level_system() noexcept -> auto& { return *_level_system; }
56
57
58
59
60
61
62

	  private:
		mirrage::ecs::Entity_manager                          _entities;
		eam::audio                                            _audio;
		std::unique_ptr<mirrage::renderer::Deferred_renderer> _renderer;
		std::unique_ptr<mirrage::renderer::Loading_system>    _model_loading;

Florian Oetke's avatar
Florian Oetke committed
63
		std::unique_ptr<gameplay::Beat_system>     _beat_system;
Florian Oetke's avatar
Florian Oetke committed
64
65
		std::unique_ptr<gameplay::Movement_system> _movement_system;
		std::unique_ptr<input::Input_system>       _input_system;
66
67
		std::unique_ptr<helper::Attachment_system> _attachment_system;
		std::unique_ptr<ui::Hud_system>            _hud_system;
Georg Schäfer's avatar
Georg Schäfer committed
68
		std::unique_ptr<level::Level_system>       _level_system;
69
		std::unique_ptr<gameplay::Camera_system>   _camera_system;
70
71
72
73
		// TODO: add systems here

		mirrage::util::Console_command_container _commands;
	};
Florian Oetke's avatar
Florian Oetke committed
74
} // namespace phase_shifter