yupplemayham/YuppleMayham/include/gameplay/scene.h

59 lines
No EOL
1.2 KiB
C++

#ifndef _H_SCENE_H
#define _H_SCENE_H
#include <string>
#include <unordered_map>
#include <memory>
class Entity;
class Camera;
class Map;
class ResourceManager;
class EventManager;
class GameActor;
class Line;
class PhysicsEngine;
struct SceneData;
enum SceneType {
SCENE_STORY,
SCENE_SHOOTER
};
class Scene
{
public:
Scene(SceneType type, std::shared_ptr<ResourceManager> resources);
void update(double deltaTime);
void render();
std::shared_ptr<GameActor> getPlayer() const;
void unloadScene();
protected:
void loadDebugShooterScene();
void loadDebugStoryScene() { /*not implemented yet*/ }
private:
void hookSceneEvents();
std::shared_ptr<GameActor> getGameActorByID(const unsigned int ID);
SceneType type;
std::shared_ptr<Map> map;
//std::shared_ptr<TileSet> tileSet;
std::shared_ptr<GameActor> player;
std::unordered_map<unsigned int, std::shared_ptr<GameActor>> entities;
std::shared_ptr<Camera> camera;
std::shared_ptr<PhysicsEngine> physicsEngine;
std::shared_ptr<Line> debugLine;
std::shared_ptr<ResourceManager> resourceManager;
std::shared_ptr<EventManager> eventManager;
std::shared_ptr<SceneData> sceneData;
};
#endif //_H_SCENE_H