diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-01 11:05:42 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-01 11:05:42 +0200 |
commit | 8e66301577551bc5b8a2e169be173e71de2f5e4e (patch) | |
tree | 52797ebfe53007eaf502c9cf9aafbd34817f5d0b /mwe/gameloop/include/loopManager.h | |
parent | 2d13805218eb34b6e06205c1b65c341ebcdad504 (diff) | |
parent | f4560e02f703f1c6f857c8e5af63fa9fc4ca6438 (diff) |
Merge branch 'master' into niels/resource-manager
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; +}; |