]> git.localhorst.tv Git - blank.git/blob - src/app/WorldState.hpp
show player orientation in debug overlay
[blank.git] / src / app / WorldState.hpp
1 #ifndef BLANK_APP_WORLDSTATE_HPP_
2 #define BLANK_APP_WORLDSTATE_HPP_
3
4 #include "PreloadState.hpp"
5 #include "State.hpp"
6 #include "UnloadState.hpp"
7 #include "../ai/Spawner.hpp"
8 #include "../ui/Interface.hpp"
9 #include "../world/World.hpp"
10
11
12 namespace blank {
13
14 class Environment;
15
16 class WorldState
17 : public State {
18
19 public:
20         WorldState(
21                 Environment &,
22                 const Interface::Config &,
23                 const World::Config &,
24                 const WorldSave &
25         );
26
27         void OnEnter() override;
28
29         void Handle(const SDL_Event &) override;
30         void Update(int dt) override;
31         void Render(Viewport &) override;
32
33         World &GetWorld() noexcept { return world; }
34
35 private:
36         Environment &env;
37         World world;
38         Spawner spawner;
39         Interface interface;
40
41         PreloadState preload;
42         UnloadState unload;
43
44 };
45
46 }
47
48 #endif