diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-09-27 14:00:57 +0200 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-09-27 14:00:57 +0200 |
commit | a78f7bbfcdabad9550afe22f615b973b92cb074f (patch) | |
tree | 318e888219965634e3b81be9b74a0522af2136e0 /mwe/gameloop/include/loopManager.h | |
parent | 86a7bd1aee2ee96079e00e2696a624fd6b642fa0 (diff) | |
parent | f4560e02f703f1c6f857c8e5af63fa9fc4ca6438 (diff) |
fixed merge conflict
Diffstat (limited to 'mwe/gameloop/include/loopManager.h')
-rw-r--r-- | mwe/gameloop/include/loopManager.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mwe/gameloop/include/loopManager.h b/mwe/gameloop/include/loopManager.h new file mode 100644 index 0000000..e202423 --- /dev/null +++ b/mwe/gameloop/include/loopManager.h @@ -0,0 +1,25 @@ +#pragma once +#include "gameObject.h" +#include "window.h" +#include <SDL2/SDL.h> +class LoopManager { +public: + LoopManager(); + void setup(); + void loop(); + +private: + std::vector<GameObject *> objectList; + void processInput(); + void update(); + void lateUpdate(); + void fixedUpdate(); + void render(); + bool gameRunning = false; + WindowManager window; + int timeScale = 1; + float accumulator = 0.0; + double currentTime; + double t = 0.0; + double dt = 0.01; +}; |