123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef GAME_H
- #define GAME_H
- #include "client/input/Control.h"
- #include "client/math/Camera.h"
- #include "client/utils/Clock.h"
- #include "client/rendering/RenderSettings.h"
- #include "client/rendering/wrapper/Shader.h"
- #include "client/math/MatrixStack.h"
- #include "client/rendering/Mesh.h"
- #include "client/rendering/Texture.h"
- #include "client/rendering/FontRenderer.h"
- class Game final {
- public:
- Game(const Control& control, const Camera& camera, Ray& ray, const Clock& fps, const Clock& tps,
- RenderSettings& renderSettings);
- void tick();
- void renderWorld(float lag, MatrixStack& stack, Shader& sh) const;
- void renderTextOverlay(float lag, MatrixStack& stack, Shader& sh, FontRenderer& fr) const;
-
- bool isRunning() const;
- private:
- void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
- const Control& control;
- const Camera& camera;
- Ray& ray;
- const Clock& fps;
- const Clock& tps;
- RenderSettings& renderSettings;
- float lengthAngle;
- float widthAngle;
- Vector pos;
- Mesh m;
- Texture texture;
- };
- #endif
|