Ajout du schéma JSON pour lecture de scènes + ajout des composants son avec OpenAL + composants scripts et libraire de script + ajout de librairies pour le son dr_libs et openAL + librairie schéma json validator + correctifs divers d'oubli et autres + entity et components factory fonctionnelles + rework API graphique et systèmes mergés dans Systèmes (audio physique, etc...) + rework sauvegarde des resources de façon unique pour éviter les reload (correctifs associés)
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
#ifndef CSCENE_HPP
|
||||
#define CSCENE_HPP
|
||||
|
||||
#include "../Systems/EntityComponentManager.hpp"
|
||||
#include "../Utils/CSerializable.hpp"
|
||||
#include "../Entity/EntityComponentManager.hpp"
|
||||
#include "../../Utils/JsonParser/CSerializable.hpp"
|
||||
#include <string>
|
||||
#include <vulkan/vulkan_raii.hpp>
|
||||
#include "../Physics/CTangibleWorld.hpp"
|
||||
#include "../Systems/Physics/CTangibleWorld.hpp"
|
||||
#include "../Systems/Audio/CAudioWorld.hpp"
|
||||
#include "Core/Systems/Scripts/CScriptWorld.hpp"
|
||||
|
||||
namespace CosmicCore {
|
||||
class CEntity;
|
||||
class CScene : public CSerializable {
|
||||
@@ -14,10 +17,16 @@ namespace CosmicCore {
|
||||
std::string m_name;
|
||||
EntityComponentManager m_ecManager;
|
||||
CTangibleWorld m_tangibleWorld;
|
||||
|
||||
CAudioWorld m_audioWorld;
|
||||
CScriptWorld m_scriptWorld;
|
||||
public:
|
||||
CScene() = delete;
|
||||
CScene(std::string name);
|
||||
CScene(CScene&&) = delete;
|
||||
CScene& operator=(CScene&&) = delete;
|
||||
CScene(const CScene&) = delete;
|
||||
CScene& operator=(const CScene&) = delete;
|
||||
|
||||
virtual ~CScene();
|
||||
|
||||
unsigned int getNumEntity() const;
|
||||
@@ -31,6 +40,11 @@ namespace CosmicCore {
|
||||
void removeEntity(unsigned int index, bool destroy = true);
|
||||
|
||||
CTangibleWorld& getTangibleWorld() {return m_tangibleWorld;};
|
||||
|
||||
CAudioWorld& getAudioWorld() {return m_audioWorld;};
|
||||
|
||||
CScriptWorld& getScriptWorld() {return m_scriptWorld;};
|
||||
|
||||
//CEntity* getActiveCamera();
|
||||
//void setActiveCamera(CEntity* newCamera);
|
||||
|
||||
@@ -85,6 +99,12 @@ namespace CosmicCore {
|
||||
}
|
||||
return s;
|
||||
};*/
|
||||
|
||||
static std::unique_ptr<CScene> load(const std::string& path);
|
||||
static void save(CScene* scene, const std::string& path);
|
||||
|
||||
void save(const std::string& path);
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user