mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 17:09:19 +02:00
ECS System WIP
This commit is contained in:
40
entitysystem/SceneManager.h
Normal file
40
entitysystem/SceneManager.h
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Created by Daniu
|
||||
//
|
||||
|
||||
#ifndef EU07_SCENEMANAGER_H
|
||||
#define EU07_SCENEMANAGER_H
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class ECScene;
|
||||
|
||||
class SceneManager
|
||||
{
|
||||
public:
|
||||
SceneManager();
|
||||
~SceneManager();
|
||||
|
||||
void SetScene(std::unique_ptr<ECScene> scene);
|
||||
void Update(float dt);
|
||||
|
||||
ECScene* CurrentScene();
|
||||
const ECScene* CurrentScene() const;
|
||||
|
||||
bool HasScene() const;
|
||||
|
||||
private:
|
||||
void SwitchScene();
|
||||
|
||||
private:
|
||||
std::unique_ptr<ECScene> m_currentScene;
|
||||
std::unique_ptr<ECScene> m_pendingScene;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //EU07_SCENEMANAGER_H
|
||||
Reference in New Issue
Block a user