Add / Remove Components

This commit is contained in:
Simon Lübeß
2022-04-10 12:18:43 +02:00
parent af37154071
commit bca72cf0d4
4 changed files with 302 additions and 192 deletions
+13 -1
View File
@@ -4,6 +4,17 @@ using System;
namespace GlitchyEngine.World
{
[AttributeUsage(.Struct, .ReflectAttribute, ReflectUser=.Methods | .NonStaticFields)]
struct ComponentAttribute : Attribute
{
public String Name;
public this(String name)
{
Name = name;
}
}
/// If an entity has the EditorComponent it won't be displayed in the scene hierarchy.
struct EditorComponent
{
@@ -13,7 +24,8 @@ namespace GlitchyEngine.World
}
}
[Component("Sprite Renderer")]
struct SpriterRendererComponent : IDisposableComponent
{
public Texture2D Sprite = null;