24 lines
434 B
C++
24 lines
434 B
C++
#pragma once
|
|
|
|
#include "state/state.hpp"
|
|
|
|
class Game {
|
|
public:
|
|
Game();
|
|
|
|
// main method of the game. run this regulary
|
|
// return false if want to exit.
|
|
bool cycle(float dt);
|
|
|
|
// for rendering
|
|
game::State *state() const { return m_state; }
|
|
|
|
// resize the playing field
|
|
void resize(int width, int height);
|
|
|
|
private:
|
|
game::State *m_state;
|
|
|
|
float m_time_for_next_step;
|
|
float m_time_step;
|
|
};
|