Porting in old gamejam code. Removed SOME cruft, more likely remains. Sound + sprite test.
This commit is contained in:
parent
1784489dfb
commit
d2499a67f8
27 changed files with 1090 additions and 4 deletions
31
src/GameEngine.h
Normal file
31
src/GameEngine.h
Normal 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; }
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue