]> git.localhorst.tv Git - blank.git/blob - src/app/ClientState.hpp
defined and implemented join and part packets
[blank.git] / src / app / ClientState.hpp
1 #ifndef BLANK_APP_CLIENTSTATE_HPP_
2 #define BLANK_APP_CLIENTSTATE_HPP_
3
4 #include "State.hpp"
5 #include "../net/Client.hpp"
6 #include "../ui/Interface.hpp"
7 #include "../world/BlockTypeRegistry.hpp"
8 #include "../world/ChunkRenderer.hpp"
9 #include "../world/World.hpp"
10
11
12 namespace blank {
13
14 class Environment;
15
16 class ClientState
17 : public State {
18
19 public:
20         ClientState(
21                 Environment &,
22                 const World::Config &,
23                 const WorldSave &,
24                 const Interface::Config &,
25                 const Client::Config &
26         );
27
28         void OnEnter() override;
29
30         void Handle(const SDL_Event &) override;
31         void Update(int dt) override;
32         void Render(Viewport &) override;
33
34 private:
35         Environment &env;
36         BlockTypeRegistry block_types;
37         World world;
38         ChunkRenderer chunk_renderer;
39         Interface interface;
40         Client client;
41
42 };
43
44 }
45
46 #endif