This commit is contained in:
antopilo
2022-06-23 20:58:07 -04:00
parent 7ba865ef14
commit a8abef1ab2
9 changed files with 7 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
#include "EditorSelectionPanel.h"
#include "src/Scene/Components/ImportComponents.h"
#include "../Misc/ImGuiTextHelper.h"
#include <src/Scene/Components/Components.h>
EditorSelectionPanel::EditorSelectionPanel()
{

View File

@@ -10,7 +10,8 @@ namespace Nuake {
Prefab,
Map,
Mesh,
Shader
Shader,
};
@@ -39,7 +40,7 @@ namespace Nuake {
class ModelResource : Resource
{
public:
std::vector<Mesh*> SubMeshes;
std::vector<Ref<Mesh>> SubMeshes;
ModelResource();
bool Load(const std::string& path);

View File

@@ -15,6 +15,6 @@
#include "CharacterControllerComponent.h"
#include "ParentComponent.h"
#include "NameComponent.h"
#include "BoxCollider.h"
#include "../Entities/Entity.h"

View File

@@ -1,22 +0,0 @@
#pragma once
// Base
#include "NameComponent.h"
#include "ParentComponent.h"
#include "TransformComponent.h"
#include "PrefabComponent.h"
#include "CameraComponent.h"
#include "LightComponent.h"
#include "MeshComponent.h"
#include "QuakeMap.h"
// Physics
#include "RigidbodyComponent.h"
#include "BoxCollider.h"
#include "SphereCollider.h"
#include "MeshCollider.h"
// Behaviour
#include "WrenScriptComponent.h"

View File

@@ -1,9 +0,0 @@
#pragma once
#include <string>
class LuaScriptComponent
{
public:
std::string Script;
};

View File

@@ -1,17 +0,0 @@
#include "QuakeMap.h"
namespace Nuake {
void QuakeMapComponent::Load(std::string path, bool collisions)
{
if (Path == path)
return;
Path = path;
}
void QuakeMapComponent::DrawEditor()
{
}
}

View File

@@ -9,17 +9,11 @@
namespace Nuake {
class QuakeMapComponent
{
private:
public:
std::vector<Ref<Mesh>> m_Meshes;
std::string Path;
float ScaleFactor = 1.0f;
bool HasCollisions = false;
void Load(std::string path, bool collisions);
void Draw();
void DrawEditor();
json Serialize()
{

View File

@@ -19,7 +19,6 @@
#include "src/Core/FileSystem.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"

View File

@@ -329,6 +329,8 @@ namespace Nuake {
if (!ent.HasComponent<QuakeMapComponent>())
return;
ent.GetComponent<NameComponent>().IsPrefab = true;
QuakeMapComponent& quakeMapC = ent.GetComponent<QuakeMapComponent>();
ScaleFactor = quakeMapC.ScaleFactor;
Scene* m_Scene = ent.GetScene();