skizzle/engine.hpp

39 lines
662 B
C++
Raw Normal View History

2016-03-08 22:28:50 +00:00
#ifndef __PTF_ENGINE_HPP__
#define __PTF_ENGINE_HPP__
2016-03-04 15:29:31 +00:00
#include <vector>
#include <SFML/Graphics.hpp>
#include "state.hpp"
#include "object.hpp"
2016-03-04 15:29:31 +00:00
/**
* La classe principale Engine coordonne les éléments
* du jeu et organise le dessin des frames
*/
class Engine {
private:
sf::Clock clock;
sf::RenderWindow window;
bool goLeftKey;
bool goRightKey;
std::vector<Object*> objects;
2016-03-04 15:29:31 +00:00
public:
Engine();
/**
* Dessine la scène du jeu couche par couche
*/
2016-03-04 15:29:31 +00:00
void draw();
/**
* Met à jour les objets du jeu pour
* qu'ils s'adaptent au nouvel état du moteur
*/
void update(State state);
2016-03-04 15:29:31 +00:00
};
#endif