2016-09-27 16:23:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "state/state.hpp"
|
|
|
|
|
|
|
|
class Game {
|
2016-09-27 18:56:17 +00:00
|
|
|
public:
|
2016-09-27 16:23:58 +00:00
|
|
|
Game();
|
|
|
|
|
|
|
|
// main method of the game. run this regulary
|
|
|
|
// return false if want to exit.
|
|
|
|
bool cycle(float dt);
|
|
|
|
|
|
|
|
// for rendering
|
2016-09-27 23:48:34 +00:00
|
|
|
game::State *state() const { return m_state; }
|
2016-09-27 16:23:58 +00:00
|
|
|
|
2016-10-02 09:00:03 +00:00
|
|
|
// resize the playing field
|
|
|
|
void resize(int width, int height);
|
|
|
|
|
2016-09-27 18:56:17 +00:00
|
|
|
private:
|
2016-09-27 16:23:58 +00:00
|
|
|
game::State *m_state;
|
|
|
|
|
|
|
|
float m_time_for_next_step;
|
|
|
|
float m_time_step;
|
|
|
|
};
|