quick & dirty timer functionality

This commit is contained in:
John McCardle 2024-03-07 08:59:26 -05:00
commit ccd79fc551
6 changed files with 118 additions and 0 deletions

View file

@ -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;