Porting in old gamejam code. Removed SOME cruft, more likely remains. Sound + sprite test.

This commit is contained in:
John McCardle 2023-02-24 23:46:34 -05:00
commit d2499a67f8
27 changed files with 1090 additions and 4 deletions

31
src/GameEngine.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include "Common.h"
#include "Entity.h"
#include "EntityManager.h"
#include "Scene.h"
class GameEngine
{
sf::RenderWindow window;
sf::Font font;
std::string scene;
std::map<std::string, Scene*> scenes;
bool running = true;
bool paused = false;
int currentFrame = 0;
sf::View visible;
public:
GameEngine();
Scene* currentScene();
void changeScene(std::string);
void quit();
void setPause(bool);
sf::Font & getFont();
sf::RenderWindow & getWindow();
void run();
void sUserInput();
int getFrame() { return currentFrame; }
sf::View getView() { return visible; }
};