3 #include <SFML/Graphics.hpp>
4 #include <box2d/box2d.h>
66 Game (
int width,
int height, std::string title);
75 const float dt = 1.0f / 60.0f;
Class for managing assets.
Definition: AssetManager.hpp:13
Class where game loop is processed.
Definition: Game.hpp:57
Game(int width, int height, std::string title)
Construct a new Game object.
Definition: Game.cpp:5
const float dt
The delta time for framerate management.
Definition: Game.hpp:75
GameDataRef _data
The shared pointer of game data.
Definition: Game.hpp:78
void run()
Run the game loop.
Definition: Game.cpp:12
sf::Clock _clock
The clock for getting ti.
Definition: Game.hpp:76
The class that manages the states in the project.
Definition: StateMachine.hpp:23
The class that manages the game time.
Definition: TimeManager.hpp:11
Custom namespace used throughout the project.
Definition: AboutState.cpp:6
std::shared_ptr< b2World > WorldRef
The Shared Pointer that points to the Box2D world.
Definition: Game.hpp:51
std::shared_ptr< ScoreTimeData > ScoreTimeRef
The Shared Pointer of ScoreTimeData struct.
Definition: Game.hpp:45
std::shared_ptr< GameData > GameDataRef
The Shared Pointer of GameData Struct.
Definition: Game.hpp:39
Struct where the necessaey game data used by all the states is stored.
Definition: Game.hpp:18
AssetManager assets
Definition: Game.hpp:22
StateMachine machine
Definition: Game.hpp:20
InputManager input
Definition: Game.hpp:21
sf::RenderWindow window
Definition: Game.hpp:19
Struct where the game time and player score is stored.
Definition: Game.hpp:29
TimeManager time
Definition: Game.hpp:30
int p2Score
Definition: Game.hpp:32
int p1Score
Definition: Game.hpp:31