Client.h 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef CLIENT_H
  2. #define CLIENT_H
  3. #include "../engine/Mesh.h"
  4. #include "../math/Vector3D.h"
  5. #include "../world/Chunk.h"
  6. #include "../engine/Texture.h"
  7. using namespace std;
  8. class Client
  9. {
  10. public:
  11. static void start();
  12. static void stop();
  13. static Client& get();
  14. virtual ~Client();
  15. private:
  16. Client();
  17. static Client* instance;
  18. static const int KEY_LEFT = 0;
  19. static const int KEY_RIGHT = 1;
  20. static const int KEY_UP = 2;
  21. static const int KEY_DOWN = 3;
  22. static const int KEY_JUMP = 4;
  23. static const int KEY_SNEAK = 5;
  24. static const int KEY_CAM_LEFT = 6;
  25. static const int KEY_CAM_RIGHT = 7;
  26. static const int KEY_CAM_UP = 8;
  27. static const int KEY_CAM_DOWN = 9;
  28. void tick();
  29. void renderTick(float lag);
  30. Texture texture;
  31. Chunk chunk;
  32. Vector3D position;
  33. float lengthAngle = 0;
  34. float widthAngle = 0;
  35. };
  36. #endif