Interface component, Serialization of mesh components

This commit is contained in:
antopilo
2021-09-08 18:35:10 -04:00
parent 61e54c5a46
commit b1a1f4f063
14 changed files with 145 additions and 64 deletions

View File

@@ -2,10 +2,7 @@
#include "src/Scene/Systems/ScriptingSystem.h"
#include "src/Scene/Systems/PhysicsSystem.h"
#include "src/Scene/Systems/TransformSystem.h"
#include "src/Scene/Systems/QuakeMapBuilder.h"
#include "src/Scene/Components/BSPBrushComponent.h"
#include "Scene.h"
#include "Entities/Entity.h"
@@ -18,10 +15,12 @@
#include "Engine.h"
#include "src/Core/FileSystem.h"
#include "Components/Components.h"
#include "Components/BoxCollider.h"
#include "Components/LuaScriptComponent.h"
#include "Components/WrenScriptComponent.h"
#include "src/Scene/Components/Components.h"
#include "src/Scene/Components/BoxCollider.h"
#include "src/Scene/Components/LuaScriptComponent.h"
#include "src/Scene/Components/WrenScriptComponent.h"
#include "src/Scene/Components/BSPBrushComponent.h"
#include "src/Scene/Components/InterfaceComponent.h"
#include <fstream>
#include <streambuf>
@@ -713,17 +712,20 @@ namespace Nuake {
void Scene::ReloadInterfaces()
{
for (auto& i : m_Interfaces)
i->Reload();
auto interfaceView = m_Registry.view<InterfaceComponent>();
for (auto i : interfaceView)
{
InterfaceComponent& uInterface = interfaceView.get<InterfaceComponent>(i);
if (uInterface.Interface)
uInterface.Interface->Reload();
}
}
void Scene::AddInterface(Ref<UI::UserInterface> interface)
{
this->m_Interfaces.push_back(interface);
}
json Scene::Serialize()
{
BEGIN_SERIALIZE();