mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Cleanup
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
#include "CharacterControllerComponent.h"
|
||||
#include "ParentComponent.h"
|
||||
#include "NameComponent.h"
|
||||
#include "BoxCollider.h"
|
||||
#include "../Entities/Entity.h"
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
class LuaScriptComponent
|
||||
{
|
||||
public:
|
||||
|
||||
std::string Script;
|
||||
};
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user