55 lines
No EOL
1 KiB
C++
55 lines
No EOL
1 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(float deltaTime);
|
|
void render();
|
|
|
|
std::shared_ptr<GameActor> getPlayer() const;
|
|
|
|
void unloadScene();
|
|
|
|
protected:
|
|
void loadDebugShooterScene();
|
|
void loadDebugStoryScene() { /*not implemented yet*/ }
|
|
|
|
private:
|
|
SceneType type;
|
|
std::shared_ptr<Map> map;
|
|
//std::shared_ptr<TileSet> tileSet;
|
|
std::shared_ptr<GameActor> player;
|
|
std::vector<std::shared_ptr<Entity>> 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
|