mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
add BaseMeta to TypeMeta
This commit is contained in:
parent
bdf31769bf
commit
4a44995b48
@ -17,8 +17,18 @@ namespace DCFApixels.DragonECS
|
|||||||
MetaDescription Description { get; }
|
MetaDescription Description { get; }
|
||||||
MetaGroup Group { get; }
|
MetaGroup Group { get; }
|
||||||
IReadOnlyList<string> Tags { get; }
|
IReadOnlyList<string> Tags { get; }
|
||||||
}
|
|
||||||
|
|
||||||
|
ITypeMeta BaseMeta { get; }
|
||||||
|
}
|
||||||
|
public static class ITypeMetaExstensions
|
||||||
|
{
|
||||||
|
public static TypeMeta FindRootTypeMeta(this ITypeMeta meta)
|
||||||
|
{
|
||||||
|
ITypeMeta result = null;
|
||||||
|
while ((result = meta.BaseMeta) != null) { }
|
||||||
|
return (TypeMeta)result;
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary> Expanding meta information over Type. </summary>
|
/// <summary> Expanding meta information over Type. </summary>
|
||||||
[MetaColor(MetaColor.DragonRose)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
@ -49,6 +59,11 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
//private EcsMemberType _memberType;
|
//private EcsMemberType _memberType;
|
||||||
|
|
||||||
|
public ITypeMeta BaseMeta
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public static TypeMeta Get(Type type)
|
public static TypeMeta Get(Type type)
|
||||||
{
|
{
|
||||||
@ -263,6 +278,11 @@ namespace DCFApixels.DragonECS
|
|||||||
private class DebuggerProxy : ITypeMeta
|
private class DebuggerProxy : ITypeMeta
|
||||||
{
|
{
|
||||||
private readonly TypeMeta _meta;
|
private readonly TypeMeta _meta;
|
||||||
|
|
||||||
|
public ITypeMeta BaseMeta
|
||||||
|
{
|
||||||
|
get { return _meta.BaseMeta; }
|
||||||
|
}
|
||||||
public Type Type
|
public Type Type
|
||||||
{
|
{
|
||||||
get { return _meta.Type; }
|
get { return _meta.Type; }
|
||||||
|
Loading…
Reference in New Issue
Block a user