31 lines
515 B
C++
31 lines
515 B
C++
#ifndef ENGINE_H
|
|
#define ENGINE_H
|
|
|
|
class Input;
|
|
class Scene;
|
|
|
|
class Engine{
|
|
public:
|
|
Engine(Input* input);
|
|
//main function
|
|
void update();
|
|
void render();
|
|
void updatePhysics();
|
|
|
|
//utils function
|
|
unsigned int getTime();
|
|
unsigned int getDeltaTime();
|
|
|
|
//scene-related function
|
|
void setCurrentScene(std::string scene);
|
|
|
|
private:
|
|
Input* m_input;
|
|
sf::Clock m_clock;
|
|
unsigned int m_timeStamp = 0;
|
|
unsigned int m_lastTimeStamp = 0;
|
|
Scene* p_currentScene;
|
|
};
|
|
|
|
#endif
|