quick & dirty timer functionality
This commit is contained in:
parent
9d728ee902
commit
ccd79fc551
6 changed files with 118 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "Scene.h"
|
||||
#include "McRFPy_API.h"
|
||||
#include "IndexTexture.h"
|
||||
#include "Timer.h"
|
||||
|
||||
class GameEngine
|
||||
{
|
||||
|
|
@ -20,6 +21,10 @@ class GameEngine
|
|||
float frameTime;
|
||||
std::string window_title;
|
||||
|
||||
sf::Clock runtime;
|
||||
std::map<std::string, Timer> timers;
|
||||
void testTimers();
|
||||
|
||||
public:
|
||||
std::string scene;
|
||||
GameEngine();
|
||||
|
|
@ -35,6 +40,7 @@ public:
|
|||
int getFrame() { return currentFrame; }
|
||||
float getFrameTime() { return frameTime; }
|
||||
sf::View getView() { return visible; }
|
||||
void manageTimer(std::string, PyObject*, int);
|
||||
|
||||
// global textures for scripts to access
|
||||
std::vector<IndexTexture> textures;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue