diff options
Diffstat (limited to 'mwe/gameloop/include')
-rw-r--r-- | mwe/gameloop/include/eventManager.h | 6 | ||||
-rw-r--r-- | mwe/gameloop/include/gameObject.h | 4 | ||||
-rw-r--r-- | mwe/gameloop/include/loopManager.h | 3 | ||||
-rw-r--r-- | mwe/gameloop/include/timer.h | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/mwe/gameloop/include/eventManager.h b/mwe/gameloop/include/eventManager.h index 69c6801..a1b9f92 100644 --- a/mwe/gameloop/include/eventManager.h +++ b/mwe/gameloop/include/eventManager.h @@ -1 +1,5 @@ -class EventManager {}; +#pragma once +class EventManager { +public: + EventManager(); +}; diff --git a/mwe/gameloop/include/gameObject.h b/mwe/gameloop/include/gameObject.h index abdc9b0..2764215 100644 --- a/mwe/gameloop/include/gameObject.h +++ b/mwe/gameloop/include/gameObject.h @@ -3,8 +3,8 @@ class GameObject { public: GameObject(); - GameObject(std::string name, float x, float y, float width, float height, - float velX, float velY); + GameObject(std::string name, float x, float y, float width, float height, float velX, + float velY); std::string getName() const; float getX() const; float getY() const; diff --git a/mwe/gameloop/include/loopManager.h b/mwe/gameloop/include/loopManager.h index e202423..7d37253 100644 --- a/mwe/gameloop/include/loopManager.h +++ b/mwe/gameloop/include/loopManager.h @@ -5,6 +5,7 @@ class LoopManager { public: LoopManager(); + ~LoopManager(); void setup(); void loop(); @@ -16,7 +17,7 @@ private: void fixedUpdate(); void render(); bool gameRunning = false; - WindowManager window; + WindowManager * window; int timeScale = 1; float accumulator = 0.0; double currentTime; diff --git a/mwe/gameloop/include/timer.h b/mwe/gameloop/include/timer.h index 8273746..3c38594 100644 --- a/mwe/gameloop/include/timer.h +++ b/mwe/gameloop/include/timer.h @@ -25,7 +25,7 @@ private: double maximumDeltaTime = 0.25; double deltaTime; double frameTargetTime = FPS / 1000; - double fixedDeltaTime = 0.01; + double fixedDeltaTime = 0.02; double elapsedTime; double elapsedFixedTime; double time; |