Pacman  1.0
Pacman game
GameController.h
Aller à la documentation de ce fichier.
1 #pragma once
2 
3 #include "Game.h"
4 #include "Renderer.h"
5 #include "constants.h"
6 #include <SDL2/SDL.h>
7 #include <iostream>
8 #include <memory>
9 
18  public:
25 
34  void run();
35 
43  void processEvent(const SDL_Event &event);
44 
45  private:
46  bool quitGame;
47  std::unique_ptr<Game> game;
48  int state = STARTING;
49 };
This class is responsible for running the game loop and processing events.
Definition: GameController.h:17
int state
Definition: GameController.h:48
std::unique_ptr< Game > game
Definition: GameController.h:47
void run()
This function runs the game loop.
Definition: GameController.cpp:44
GameController()
Construct a new Game Controller object.
Definition: GameController.cpp:3
void processEvent(const SDL_Event &event)
This function processes events.
Definition: GameController.cpp:10
~GameController()
Definition: GameController.cpp:8
bool quitGame
Definition: GameController.h:46
#define STARTING
Definition: constants.h:29