aboutsummaryrefslogtreecommitdiff
path: root/mwe/gameloop/include/loopManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'mwe/gameloop/include/loopManager.h')
-rw-r--r--mwe/gameloop/include/loopManager.h25
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..06bcd5f
--- /dev/null
+++ b/mwe/gameloop/include/loopManager.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <SDL2/SDL.h>
+#include "window.h"
+#include "gameObject.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;
+};