rename MetaPRoxy yto MetaProxyBase

This commit is contained in:
Mikhail 2026-04-14 15:19:26 +08:00
parent 23cee3e4c7
commit 9deb8aa3a9
2 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@ namespace DCFApixels.DragonECS
Type = type; Type = type;
} }
} }
public class MetaProxy public class MetaProxyBase
{ {
public static readonly MetaProxy EmptyProxy = new MetaProxy(typeof(void)); public static readonly MetaProxyBase EmptyProxy = new MetaProxyBase(typeof(void));
public static TypeMeta EmptyMeta => TypeMeta.NullTypeMeta; public static TypeMeta EmptyMeta => TypeMeta.NullTypeMeta;
public readonly Type Type; public readonly Type Type;
public virtual string Name { get { return null; } } public virtual string Name { get { return null; } }
@ -26,7 +26,7 @@ namespace DCFApixels.DragonECS
public virtual MetaDescription Description { get { return null; } } public virtual MetaDescription Description { get { return null; } }
public virtual MetaGroup Group { get { return null; } } public virtual MetaGroup Group { get { return null; } }
public virtual IEnumerable<string> Tags { get { return null; } } public virtual IEnumerable<string> Tags { get { return null; } }
public MetaProxy(Type type) public MetaProxyBase(Type type)
{ {
Type = type; Type = type;
} }

View File

@ -49,7 +49,7 @@ namespace DCFApixels.DragonECS
private readonly int _uniqueID; private readonly int _uniqueID;
internal readonly Type _type; internal readonly Type _type;
private readonly MetaProxy _proxy; private readonly MetaProxyBase _proxy;
private bool _isCustomName; private bool _isCustomName;
private bool _isCustomColor; private bool _isCustomColor;
@ -122,7 +122,7 @@ namespace DCFApixels.DragonECS
{ {
_uniqueID = _increment++; _uniqueID = _increment++;
_type = type; _type = type;
_proxy = MetaProxy.EmptyProxy; _proxy = MetaProxyBase.EmptyProxy;
if (type.ContainsGenericParameters == false && if (type.ContainsGenericParameters == false &&
type.TryGetAttribute<MetaProxyAttribute>(out var proxyAtr)) type.TryGetAttribute<MetaProxyAttribute>(out var proxyAtr))
@ -140,7 +140,7 @@ namespace DCFApixels.DragonECS
if (proxyType.ContainsGenericParameters == false) if (proxyType.ContainsGenericParameters == false)
{ {
var proxy = Activator.CreateInstance(proxyType, type) as MetaProxy; var proxy = Activator.CreateInstance(proxyType, type) as MetaProxyBase;
if (proxy != null) if (proxy != null)
{ {
_proxy = proxy; _proxy = proxy;