GEJM
1.0.0.0
a 2D platformer made by students
|
#include <ViewModel.h>
Public Member Functions | |
ViewModel (Game *const game, SDLWrapper *const sdlWrapper) | |
~ViewModel () | |
void | handleEvents () |
void | drawLoop () |
ViewModel & | operator= (ViewModel const &)=delete |
ViewModel is a class responsible for drawing game. It interprets game states and objects and draws them on screen using SDLWrapper.
ViewModel::ViewModel | ( | Game *const | game, |
SDLWrapper *const | sdlWrapper | ||
) |
Initializes variables.
game | a constant pointer to a Game object |
sdlWrapper | a constant pointer to an SDLWrapper |
ViewModel implementation Initializes variables.
game | a constant pointer to a Game object |
sdlWrapper | a constant pointer to an SDLWrapper |
ViewModel::~ViewModel | ( | ) |
Default destructor
void ViewModel::drawLoop | ( | ) |
A draw loop. Interprets current game state and chooses what to draw.
void ViewModel::handleEvents | ( | ) |
Handling events.
Assigment operator is overloaded because it cannot be generated by compiler but because it shouldn't be used it's deleted.