]> git.localhorst.tv Git - blank.git/blob - src/app/WorldState.hpp
make buttons configurable
[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         Interface &GetInterface() noexcept { return interface; }
35
36 private:
37         Environment &env;
38         World world;
39         Spawner spawner;
40         Interface interface;
41
42         PreloadState preload;
43         UnloadState unload;
44
45 };
46
47 }
48
49 #endif