Moved Components to their respective namespaces

This commit is contained in:
Simon Lübeß
2023-12-15 14:53:10 +01:00
parent 66281ebddb
commit b884ee8303
8 changed files with 8 additions and 14 deletions
+1 -1
View File
@@ -631,7 +631,7 @@ static class ScriptEngine
s_EngineObject = new ScriptClass("GlitchyEngine.Core", "EngineObject", s_CoreAssemblyImage, .Class); s_EngineObject = new ScriptClass("GlitchyEngine.Core", "EngineObject", s_CoreAssemblyImage, .Class);
s_EntityRoot = new ScriptClass("GlitchyEngine", "Entity", s_CoreAssemblyImage, .Entity); s_EntityRoot = new ScriptClass("GlitchyEngine", "Entity", s_CoreAssemblyImage, .Entity);
s_ComponentRoot = new ScriptClass("GlitchyEngine.Components", "Component", s_CoreAssemblyImage, .Component); s_ComponentRoot = new ScriptClass("GlitchyEngine.Core", "Component", s_CoreAssemblyImage, .Component);
// Editor classes // Editor classes
s_EntityEditor = new ScriptClass("GlitchyEngine.Editor", "EntityEditor", s_CoreAssemblyImage, .Class); s_EntityEditor = new ScriptClass("GlitchyEngine.Editor", "EntityEditor", s_CoreAssemblyImage, .Class);
+2 -2
View File
@@ -64,8 +64,8 @@ static class ScriptGlue
s_HasComponentMethods.Clear(); s_HasComponentMethods.Clear();
s_RemoveComponentMethods.Clear(); s_RemoveComponentMethods.Clear();
RegisterComponent<TransformComponent>("GlitchyEngine.Transform"); RegisterComponent<TransformComponent>("GlitchyEngine.Core.Transform");
RegisterComponent<Rigidbody2DComponent>("GlitchyEngine.Rigidbody2D"); RegisterComponent<Rigidbody2DComponent>("GlitchyEngine.Physics.Rigidbody2D");
} }
[RegisterMethod] [RegisterMethod]
@@ -1,6 +1,4 @@
using GlitchyEngine.Core; namespace GlitchyEngine.Core;
namespace GlitchyEngine.Components;
/// <summary> /// <summary>
/// The base class for all Components. /// The base class for all Components.
@@ -1,8 +1,6 @@
using GlitchyEngine.Components;
using GlitchyEngine.Core;
using GlitchyEngine.Math; using GlitchyEngine.Math;
namespace GlitchyEngine; namespace GlitchyEngine.Core;
/// <summary> /// <summary>
/// Represents the position, rotation and scale of an entity in the world. /// Represents the position, rotation and scale of an entity in the world.
-1
View File
@@ -6,7 +6,6 @@ using System.Linq;
using System.Numerics; using System.Numerics;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using GlitchyEngine.Components;
using GlitchyEngine.Core; using GlitchyEngine.Core;
using GlitchyEngine.Extensions; using GlitchyEngine.Extensions;
using GlitchyEngine.Math; using GlitchyEngine.Math;
+1 -2
View File
@@ -1,6 +1,5 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using GlitchyEngine.Components;
using GlitchyEngine.Core; using GlitchyEngine.Core;
using GlitchyEngine.Extensions; using GlitchyEngine.Extensions;
@@ -250,7 +249,7 @@ public class Entity : EngineObject
} }
/// <summary> /// <summary>
/// Gets the <see cref="GlitchyEngine.Transform"/> <see cref="Component"/> of this <see cref="Entity"/>. /// Gets the <see cref="Core.Transform"/> <see cref="Component"/> of this <see cref="Entity"/>.
/// </summary> /// </summary>
public Transform Transform => GetComponent<Transform>(); public Transform Transform => GetComponent<Transform>();
-1
View File
@@ -1,5 +1,4 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using GlitchyEngine.Components;
using GlitchyEngine.Core; using GlitchyEngine.Core;
namespace GlitchyEngine.Physics; namespace GlitchyEngine.Physics;
@@ -1,6 +1,7 @@
using GlitchyEngine.Core;
using GlitchyEngine.Math; using GlitchyEngine.Math;
namespace GlitchyEngine.Components; namespace GlitchyEngine.Physics;
/// <summary> /// <summary>
/// Rigid body component for 2D physics. /// Rigid body component for 2D physics.