diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-04-15 12:17:53 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-04-15 12:17:53 +0200 |
commit | 2ee0f834487cfe4b6bd9424ca2715685a8db16e4 (patch) | |
tree | 6867718d6bfcd42f6a82c86dd8f149d6ea6cab68 /Game.hpp | |
download | AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.gz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.bz2 AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.lz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.xz AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.tar.zst AltCraft-2ee0f834487cfe4b6bd9424ca2715685a8db16e4.zip |
Diffstat (limited to 'Game.hpp')
-rw-r--r-- | Game.hpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Game.hpp b/Game.hpp new file mode 100644 index 0000000..68be9ab --- /dev/null +++ b/Game.hpp @@ -0,0 +1,52 @@ +#pragma once + +#include "PositionI.hpp" +#include "NetworkClient.hpp" +#include "World.hpp" +#include "Display.hpp" + +class Game { +public: + Game(); + + ~Game(); + + void MainLoop(); + +private: + //utility variables + NetworkClient *m_nc; + bool m_exit = false; + ConnectionState m_networkState = ConnectionState::Handshaking; + Display *m_display; + + //utility methods + void ParsePackets(); + + //game state variables + World m_world; + + std::string g_PlayerUuid; + std::string g_PlayerName; + int g_PlayerEid; + byte g_Gamemode; + byte g_Difficulty; + int g_Dimension; + byte g_MaxPlayers; + std::string g_LevelType; + bool g_ReducedDebugInfo; + PositionI g_SpawnPosition; + bool g_PlayerInvulnerable; + bool g_PlayerFlying; + bool g_PlayerAllowFlying; + bool g_PlayerCreativeMode; + int g_PlayerFlyingSpeed; + int g_PlayerFovModifier; + bool g_IsGameStarted = false; + float g_PlayerPitch; + float g_PlayerYaw; + double g_PlayerX; + double g_PlayerY; + double g_PlayerZ; +}; + |